Abstract
It is easy to apply artificial intelligence methods and address scientific problems with concrete rules. However, it is often challenging to apply these methods to art creation problems of weak regularity. To automatically generate musical melodies in the prairie songs of northern China, this paper proposes a formal method for melody creation based on theme development and fuzzy inference. First, we analyze the features of mode and scale in the prairie songs and construct an algorithm to generate a theme phrase according to the inner fuzzy relations among the prairie-song phrases to obtain seed materials. Then, concerning the fuzzy relations between two phrases in the prairie songs, this paper adopts fuzzy inference to manage the progression of the phrase relations and generates developmental phrases. Finally, many complete melodies of the prairie songs are generated. Compared with existing rule-based approaches, the proposed method can improve the global structure of music and can make the output compositions more musical and interesting.
Introduction
The prairie of northern China includes the entire Inner Mongolia autonomous region and parts of the four other regions of Heilongjiang, Jilin, Liaoning, and Xinjiang [1]. Prairie songs of northern China (PSNC) is a major category of Chinese national music, according to regional classification. PSNC is an important branch of the northern prairie music and the foundation of dance, rap, opera and instrumental music. PSNC has the important significances of practicality, appreciation, reconstruction, etc. [2] and has been the subject of extensive academic research. However, with the development of society, prairie culture is declining, and the inheritance and development of PSNC are in crisis. The production efficiency of PSNC is very low because it is often refined through continuous processing by many people over a long time. Therefore, enhancing composition ability is a significant task [3] for the continuance and development of PSNC, which is famous for expressing emotion and praising the prairie culture.
Intelligent music composition minimizes the degree of human intervention in music composition through formal machine methods [4]. Formal methods of intelligent composition are effective in improving the ability to create music, and PSNC is no exception. A composer can obtain inspiration by listening to a machine’s compositions and can revise and improve them, which not only reduces the human workload but also improves the quality of the composition. This development of music in terms of quality and quantity can promote the consumption of music in many industries, such as the cultural, tourist, education, and health industries. In addition, intelligent composition can substantially reduce paper waste compared with traditional composition activities. Therefore, intelligent music composition for PSNC has important social, economic, and environmental significance, which can make important contributions to the Chinese national cultures and to the progress of world civilization.
Related work
In this article, musical and structured melodies are generated based on the rules of PSNC. The related methods can be divided into three categories, namely, explicit approaches, implicit approaches, and Lindenmayer systems (L-systems). These methods have some intersectional parts and are not independent of one another. Here, we analyze the features of these three categories.
The explicit approach utilizes rules, knowledge, and grammars that are obtained directly from the composer or designer of the system [5]. For example, Robert M. Keller and David R. Morrison [6] used probabilistic grammars to design a method to automatically generate jazz melodies by creating a mapping between terminals and musical symbols. Donya Quick [7] described a grammar of chord progression for classical Western music using ideas from Schenkerian analysis and generated new compositions with the aid of chord spaces. Later, Donya Quick and Paul Hudak [8] proposed a class of generative grammars called “Probabilistic Temporal Graph Grammars”, which can address harmonic and metrical structures using parameterization rules. The main advantage of the explicit method is that it is relatively easy to acquire knowledge and rules. However, this method is often restricted by the background knowledge of the composer or designer.
In the implicit approach, the knowledge and grammars are obtained by machine learning from existing music samples [5]. Jon Gillick [9] described a method to obtain grammars by machine learning and generated jazz melodies through clustering and Markov models. Dorien Herremans [10] learned a Markov model of abstract features from an existing musical corpus and created new compositions using the model. Carles Roig [11] learned a probabilistic model for the characterization of music from music samples and generated new melodies. D. Herremans [12] generated bagana music based on a first-order Markov model and handled long-term coherence with the model. Abdallah S. et al. [13] learned the probabilities for simple grammars from the pitch sequences in a corpus of two types of symbolic music. The ideas of the methodology can be used to generate music. Choi K et al. [14] introduced an automatic music composition method of text-based Long Short-Term Memory (LSTM) networks that learn the relations within text documents that represent chord progressions and drum tracks. The implicit approach can reduce the amount of music knowledge that is embedded into the system, and the knowledge and rules are not affected by the system’s designer. However, this method is limited to the accuracy and validity of machine learning. In general, it is also difficult to generate globally structured music with this approach [15].
L-systems are a specific variant of formal grammar that use a set of rewriting rules and mapping algorithms to generate music [16 –18]. Pedro Pestana [19] developed an interactive real-time improvisation system based on L-systems. Lynda Annette Watson [20] achieved a repetition effect in smaller, simpler structures of music using L-systems. Inspired by trees, Adam James Wilson [21] modeled the growth of a tree and mapped its image to musical parameters, such as pitch, duration, and amplitude. Generally, L-systems can generate locally structured music but have difficulty in producing high-quality globally structured music. Moreover, subjectivities often exist in the design of rewriting rules.
Existing research has promoted the development of artificial intelligence for art creation. However, the shortcomings are obvious, which can be summarized as follows.
The research on the relations among melodic structures is very weak, especially on the global structure of a melody [15], which greatly influences the psychological process of the listener and determines to a large extent the quality of the composition.
Scholarly attention has been paid more to the technical aspects than to the artistic aspects of making music. The techniques of intelligent music composition mainly come from related methods of artificial intelligence. The precise operating mode of technology is often difficult to match with the fuzzy operating mode of art, which makes it difficult to create highly innovative music.
Most existing composition methods are based on the ideas of chord/harmonic progression, which may be effective in generating Western music. However, it is inappropriate to directly use these methods to generate Eastern national music because this type of music has almost no harmonic ideology and emphasizes the transverse “line” of melody. PSNC is a representative national music of China. There are few formal composition methods for PSNC. Therefore, it is necessary to build a methodology to automatically generate the melodies of PSNC.
To generate musical and structured melodies, this paper, starting from the fuzzy approach of musical art, studies automatic generation methods of theme phrases and some developmental phrases based on PSNC and validates them experimentally.
It is easy to generate melodic fragments, which only touches on the local-structure problems. However, the generation of a complete melody is difficult because it involves not only the local structure but also the global structure.
To computationally generate good music, we must resolve the contradiction between computer science and musical art. The approach of computer science is accurate and rational, whereas the approach of musical art is fuzzy [22, 23] and perceptual. Combining fuzzy inference with a random method is an effective way to solve this problem and address the regularities and irregularities of music.
Accordingly, we use the following approach to generate the melodies of prairie songs. The first step analyzes the features of PSNC. According to these features, we adopt fuzzy inference to generate a theme phrase, which involves the processing of a local structure. The second step is to formalize the melody development process. We use fuzzy inference to manage the progression of phrase relations. Then, several developmental phrases are generated. This approach involves the arrangement of the local structure and global structure. Additionally, the basic ideas of fuzziness and randomness are always incorporated into the handling of these problems.
Method of composition
In [24], we proposed a method to compose structured melodies that first generates a theme phrase and then generates developmental phrases according to the constructed relation models. This composition process is referenced in this paper, but the operational methods are changed in the following two aspects.
The method that is used to generate the theme phrase is reconstructed. In [24], we generated the theme phrase of a happy melody based on the interval distribution of happy melodies, and the intervals of thirds were very important features. However, in PSNC, the features of the interval distribution are not obvious. Nonetheless, the features of “three-pitch” groups are important to the design algorithm, which is described in detail in the following sections.
The method that is used to generate developmental phrases is improved and adapted for PSNC. In [24], several relational operators to develop theme phrases are constructed, and the progression of these operators is basically random, which can produce a happy melody. However, it is inappropriate to directly apply this method to the composition of PSNC, which should be managed by fuzzy inference.
Now, we explain the composition method of PSNC. It is necessary to analyze the features of PSNC before generating a melody.
Analyzing the features of PSNC
The northern prairie people mostly engage in nomadism and fishing. The scale of PSNC is pentatonic, and the five notes are called gong, shang, jue, zhi and yu. Their intervals are shown in Fig. 1. The flags of notes are shown in Table 1, which includes the domain of three octaves. This domain is sufficient for PSNC.

The scales and intervals of PSNC.
The flags of notes
The frequently used modes [25] of PSNC are summarized in Table 2. These modes are used more frequently because of cultural reasons.
The frequently used modes of PSNC
The progression of “three-pitch” groups (TPGs) and the progression of their variants (TPGVs) are the most prominent features of a PSNC melody [25, 26], which are different from the chord/harmonic progression of Western music.
The interval structures within TPGs can be divided into the following three types: 1) major second + major second; 2) major second + minor third; and 3) minor third + major second. The space of TPGs is listed in Table 3, where the main note (MN) is the maximum-force note. The MN is at a dominant position in TPGs.
The space of TPGs
TPGVs are the set of variants of TPGs, and the generation of TPGVs is described in the next section.
TPGVs can be obtained by converting TPGs with the following methods. Change a pitch of TPGs by moving up/down an octave, e.g., by changing “5,6,11” to “5,6,1”. Change the pitch order of TPGs, e.g., by changing “1,2,3” to “1,3,2” or “–6,1,2” to “–6,2,1”. Omit all the non-main notes of TPGs, e.g., by changing “–6,1,2” to “–6”. Omit any one non-main note of TPGs, e.g., by changing “–6,1,2” to “–6,1” or “–6,2”. Replace all the non-main notes with the main note, e.g., by changing “–6,1,2” to “–6,–6,–6”. Replace any one non-main note with the main note, e.g., by changing “–6,1,2” to “–6,1,–6”. Replace any one non-main note with the note that is down from the main note by a major second or perfect fourth, e.g., by changing “–6,1,2” to “–6,–5,2” or “–6,1,2” to “–6,–3,2”. Add the main note to TPGs, and use a random rearrangement, e.g., by changing “–6,1,2” to “–6,–6,1,2” or “–6,1,–6,2”, which can be repeated many times. Add several notes to TPGs, which are down/up from the main note by a major second or minor/major third or perfect fourth. This operation is usually combined with 8), e.g., by changing “–6,1,2” to “–6,1,2,–6,–5,–3”. Combine two or three of the methods that are mentioned above, e.g., by changing “–6,1,2” to “–6,1,–6” according to 6) and “–6,1,–6” to “–6,–5,–6” according to 7).
Generation of a theme phrase
In this section, the item “sequence” is frequently used. Thus, it is necessary to introduce the sequence representation method. We use
For a complete melody, the theme phrase is the seed of melody development [27]; therefore, the first step is to generate a theme phrase.
The melody of PSNC can be formed by the progression of TPGs or TPGVs, as shown in Section 3.1. Therefore, the main task in generating a theme phrase is to arrange the sequence of TPGs or TPGVs, and the key step is to generate a sequence of MNs, as shown in Table 3, which can form the melodic framework of the theme phrase. Considering the fuzzy regularities of PSNC, we use a fuzzy inference with the concrete operations that are defined below.
First, we define a domain of MNs as
For a sequence, the number of elements must be determined. This number can be set manually or calculated by a computer. To realize automation, we use automatic calculation to obtain this number.
In this paper, the calculation incorporates random factors. For a purely rule-based composition system, the output result is often too predictable; thus, it is difficult to generate high-quality music [28]. Therefore, we integrate random factors that are obtained by a random number generating function. We use r = Rand (a, b) to generate a random number from a to b. If the function is executed more than n = |a - b| times, the data between a and b can be in a state of average distribution. During the process of composing music, the degree of randomness must be well controlled. If it is too random, then the generated music will lack cohesion and have a centrifugal sense. Parameters a and b are the factors that control randomness.
We use N mn = F [btm/top * Rand (2, 6)] to generate the number of elements of the MNS, where btm is the bottom of the time signature (TS), top is the top of the TS, and F is the floor function.
According to the mode features, connotation characteristics and progression rules of PSNC, we generate the MNS of the theme phrase using fuzzy computation [29] with the following steps. Define two linguistic variables of the MN: u (the current MN) and v (the next MN). Then, define three linguistic values of the Perform the relevant fuzzy calculations. Here, the aim of the fuzzy calculation is to deduce v from u according to the fuzzy rules, shown in Fig. 2. To make the calculations in the following sections easy to understand, we first introduce the relevant computation rules with some examples, which mix with a part of the idea in [30
–32].

The input/output parameters for fuzzy model.
If X = (x1, x2, x3) and Y = (y1, y2, y3), then
If X = (x1, x2, x3), then X c = (1 - x1, 1 - x2, 1 - x3).
If domain
If X = (x1, x2, x3) and
3) Calculate the fuzzy relations that are implied by the following control rules.
Rule 1: If u is TP, then v is AP or TP. The solution method for the corresponding fuzzy relation (
If x = 1, then
Therefore, if x = 1, then
Similarly, if x = 2, then
Rule 2: If u is AP, then v is TP, BP or AP. The solution method for the corresponding fuzzy relation (
Rule 3: If u is BP, then v is AP. The solution method for the corresponding fuzzy relation (
4) Define two 12-element arrays
Array
5) Initialize the first element MNS [0] using the mode tonic, and obtain the index i in
An example of
6) Obtain v through the synthetic operation in Equation (9), and obtain MNS [1]. Fuzzy relation
Let us continue the example in Table 5. With Equation (11), we obtain the following results: C (u - TP) =1.25; C (u - AP) =3.66; and C (u - BP) =5.84. Thus,
7) Repeat the above operation until the number of generated MNs is equal to N mn . Then, the MNS of the theme phrase can be acquired. For example, MNS = {-6, 2, 3, - 6}.
8) By operating on each element of the MNS one-by-one according to Table 3 and by using the method that is discussed in section 3.2, the pitch sequence of the theme phrase can be obtained. For example, if MNS [0] = -6, then the corresponding TPGs are “–6,1,2” according to Table 3, and the results of the TPGVs have many solutions according to the method in section 3.2. Randomly select a method. Suppose the output result is “–6,1,–6”. Then, the pitch sequence that corresponds to MNS [0] is complete. The other elements of the MNS are processed in the same way. Then, the ultimate pitch sequence can be obtained. Suppose the result is PS= {“–6,1,–6”, “2,3,2”, “3,3,2,1”, “–6”}, where PS is the flag set of the pitch sequence.
9) Add rhythm to every group in PS. The rhythm is the result of a selection from the database of pre-constructed rhythm templates of PSNC according to the number of notes. For example, suppose the input parameters are as follows: the pitch group is “–6,1,–6”; the TS is 2/4; and there are three elements in the selectable space of the rhythm template, namely, “1,0.5,0.5”, “0.5,0.5,1”, and “1.5,0.25,0.25”. Then, the output result may be “1,0.5,0.5” (random selection), which is shown in the first bar of Fig. 3. Similarly, the other pitch groups can be processed; the image of the musical score is shown in Fig. 3 for a key signature (KS) of C and in Fig. 4 for a KS of F.

An example of theme phrase for a KS of C.

An example of theme phrase for a KS of F.
From the perspective of musicology, the movement of a melody follows two basic rules [27]. One rule is the uniform relation, which can strengthen the theme; the other rule is the contrastive relation, which can make the melody fresh and unforeseen. The two relations between phrases are both fuzzy, that is, “unification is in contrast, and contrast is in unification” [27].
To generate developmental phrases, two steps must be performed. The first step is the overall control of the relational progression (determining the relational operation of the current output, that is, “do what”); the second step is the relational operations of unification and contrast (determining the concrete method of the relational operation, that is, “how to do”). This strategy has been adopted in our previous work [24], and the “how to do” problem has been researched. However, the control problem of “do what” has not been well solved. Therefore, this section mainly aims to solve the problem of the overall control of the relational progression to reflect the prairie style and make the output results more musical.
The task of overall relational control is to control the next relation according to the current relation. If this task is not performed well, then one of two situations will occur, namely, too much unification or too muchcontrast. Too much unification will make the listener bored and drowsy, whereas too much contrast will cause the output results to lack cohesion and musicality and will thus leave the listener with no impression.
The progression of the phrase relation relates to musical structure theories. Fuzziness also exists in the musical structure of Chinese national music [33]; therefore, fuzzy inference can be used to control the overall progression of relations. The composer’s control of the relations among phrases can be described as follows:
If more unification exits in the current relation, then contrast should be enhanced in the next relation. If more contrast exits in the current relation, then unification should be enhanced in the next relation. The modeling of fuzzy inference using this experience is described as follows.
First, we define a domain
Second, we define the two linguistic variables of x (the current relation) and y (the next relation).
Third, we define three linguistic values of
Fourth, we assign values to these linguistic values, which are the fuzzy vectors of
According to the composition experience of PSNC, the rules can be described as follows: if x is A, then y is C; if x is B, then y is B; and if x is C, then y is A. Thus, fuzzy relation
The synthesis operation is expressed in Equation (13):
Input x is a term of musicology that corresponds to the developmental pattern of the melody, namely, repetition(x1), sequence(x2), correspondence(x3), extension(x4), and expansion(x5). According to their musicological significance, these patterns can be expressed using the following fuzzy vectors of the
Input x is acquired by the random selection of these five values. Then, according to Equation (13), the output result y can be obtained, which should be mapped to a value of x and act as a new input. The mapping method is explained as follows.
First, compute the closeness degree C of y and x with Equation (14), where a
i
and b
i
are elements of x and y, respectively; that is, x = (a
0, a
1, a
2, a
3, a
4, a
5, a
6, a
7, a
8) and y = (b
0, b
1, b
2, b
3, b
4, b
5, b
6, b
7, b
8).
Second, denote the calculation results as C (y - x1), C (y - x2), C (y - x3), C (y - x4), and C (y - x5). In these five results, the minimum two values are written as C (y - x i ) and C (y - x j ). Let r = Rand (1, 2). Then, the mapping result y is x i (if r = 1) or x j (if r = 2), which is a new input.
Third, repeat the above operations N pr - 1 times, where N pr is the number of phrases and N pr = Rand (2, 6). Then, the total control is complete.
According to this total control of relations, along with the relational operation of [24] (this relational operation can be used for melodies of many styles), the complete melody can be obtained.
The aim of this process is to make the final output multiple, structural, rich and musical because melody generation is controlled by macro rules and is free from micro constraints, which accords with the fuzzy characteristic of musical art.
This section presents multiple composition experiments and evaluations. For the convenience of description, in this paper, the fuzzy-rule method that is described above is referred to as the FR method, and the existing-rule method is referred to as the ER method; these two methods are compared. The composition process of the ER method is as follows. First, multiple implicit-transfer rules of notes are extracted from music samples of PSNC by machine learning. Second, these rules are corrected in a human-explicit manner. Third, a sequence of notes is generated by these rules. The details of this process can be obtained by referring to the previously mentioned works in the literature.
Experimental results
Two groups of compositions are generated. The first group is generated by the FR method, and the second group is generated by the ER method. Table 6 shows the number of compositions at each step of the experiment. In each group, the total number of generated compositions is set at one hundred. Ten of these compositions are randomly selected for the sampling evaluation, and because of limited space, four are randomly selected to present to the reader, as shown in Figs. 5–12. These compositions can be played by MIDI technique with some instruments of GM (such as piano, violin) and several Chinese musical instruments (such as Erhu, Horse head string instrument; and VST plugin must be installed).
The number of compositions at each step
The number of compositions at each step

FR1.

FR2.

FR3.

FR4.

ER1.

ER2.

ER3.

ER4.
The evaluation of an intelligent composition system is the evaluation of the composition qualities of the output. To obtain a more direct measure of system performance, most researchers adopt the human-listening evaluation method because music is subjective and perceptual, as in [5 , 35].
To make the evaluation more comprehensive, we adopt a hybrid evaluation approach that consists of a subjective evaluation and objective evaluation. The subjective evaluation relies on the subjective feelings of humans when listening to the compositions, and the objective evaluation is an objective analysis of the musical notes.
Subjective evaluation
For the subjective evaluation, two factors should be considered. One factor is the number of times that the evaluator listens to the composition. If the evaluator listens only once, he or she may not fully capture all the information of the composition and make an incomplete and unscientific assessment. The other factor is the number of samples. If the evaluator listens to many samples, he or she may be affected by his or her emotional state, fatigue, boredom or other factors and make inconsistent decisions before and after the assessment.
Accordingly, we adopt an approach where the evaluator listens to every composition three times, and the number of samples is ten, as shown in Table 6. The evaluators are divided into two groups, namely, a professional group (ten people) and a non-professional group (ten people). Each evaluator is asked to grade the current composition and give a score from 0 to 10 according to his feelings. Through statistical computations, the average scores of the ten compositions are computed, which are shown in Fig. 13, where “H” represents a composition that is generated by a human.
Figure 13 shows that for benchmarking method H, the final average score is 9.1*0.65+8.9*0.35 = 9.03, where 0.65 is the weighted value of the professional group and 0.35 is the weighted value of the non-professional group. For the FR method, the final average score is 7.8*0.65+8.6*0.35 = 8.08, so the relative difference RD FR = (9.03-8.08)/9.03 = 10.5%. For the ER method, the final average score is 5.1*0.65+6.2*0.35 = 5.485, and the relative difference RD FR = (9.03-5.485)/9.03 = 39.3%.

Contrast result of the subjective evaluation.
In music, unification-contrast rules (U-C rules) play a very important role in evaluating music. Thus, the objective evaluation should consider the relations between two phrases in the flowing melody. Therefore, in a composition, the percentage of phrases that satisfy the U-C rules can be used as an index for an objective evaluation. In addition, the ratio of unification to contrast can be used as an evaluation index because it reflects the degree of the balance of the relations in a composition.
We present an example to illustrate the objective evaluation. In Fig. 7, this composition can be divided into eleven phrases, as shown in Table 7. If the relation between the current phrase and the previous phrase is unification or contrast, then the current phrase can be deemed to satisfy the U-C rules.
An example of analyzing the unification-contrast rules
An example of analyzing the unification-contrast rules
For the 1st phrase, the previous phrase is just the end phrase (the 11th phrase). The first three bars of this phrase repeat the first three bars of the 11th phrase. They are unification relations. For the 2nd phrase, the relation with the 1st phrase is very weak and neither unification nor contrast. For the 3rd phrase, the rhythm is the same as the rhythm of the 2nd phrase. The pitches are offset upwards by an octave. Therefore, they are unification relations. For the 4th phrase, compared with the 3rd phrase, the 9th bar is the rhythm contrast to the 7th bar, and the 10th bar is the pitch contrast to the 8th bar. Thus, they can be deemed to be contrast relations. These analysis approaches can be used to classify the other phrases.
According to the last column of Table 7, nine phrases satisfy the U-C rules, and the average percentage is 9/11 = 0.818. In addition, the number of unifications is 4, and the number of contrasts is 5; therefore, the average ratio of unification to contrast is 4/5 = 0.8. Thus, the final average score is (0.818+0.8)/2 = 0.809.
Similarly, the evaluation results for the other compositions can be obtained using the abovementioned approach. The final statistical results are shown in Fig. 14. The final average score is 0.88 for benchmarking method H, 0.83 for the FR method and 0.42 for the ER method, and the relative difference of RD FR = (0.88-0.83)/0.88 = 5.68%, RD ER = (0.88-0.42) /0.88 = 52.27%.

Contrast result of the objective evaluation.
According to Fig. 13, the average score of the professional group is lower than the average score of the non-professional group, probably because the evaluators of the professional group are more sensitive to music and, therefore, small defects in composition may have a significant influence on these evaluators. In contrast, the evaluators in the non-professional group are often insensitive to music, and generally, only large defects in composition influence them. The two weight values, namely, 0.65 and 0.35, are set based on this observation. In addition, this figure shows that the average score of the FR method is greater than the average score of the ER method, which is because the fuzzy inference of the phrase relations enhances the musical structure and leaves a better impression on the evaluators. Figure 14 shows that regardless of the average percentage of the U-C rules that are satisfied or the average ratio of unification to contrast, the result of the FR method is much larger than the result of the ER method because the fuzzy inference of the FR method emphasizes not only the local structure but also the global structure of the music, which causes the output compositions to well satisfy the U-C rules and makes the unification and contrast of the music more balanced.
Therefore, the main reason that the techniques of the ER method are unfit for PSNC is that the ER method has difficulty creating a melody that has a global musical structure. However, in the FR method, the integration of fuzzy inference and random thinking makes the generation of music restricted and free, that is, restraint with freedom and freedom with restraint. In our opinion, a musical composition contains a “bone” part and a “meat” part. The “bone” part, which includes the musical structure (the relations of the unification and contrast between phrases), skeleton notes (MNs in this paper), and long-duration notes (generally longer than half of the total number of beats of one bar), has both regularities and irregularities. Thus, it is appropriate to arrange these elements using fuzzy inference and a random approach, which can result in a more musical and multitudinous output. The elements of this part can be regarded as the “macroscopic” elements of music. The elements of the “meat” part, which include concrete pitches, durations, and pitch conversions, can be called the “microcosmic” elements of music. The arrangement of the “macroscopic” elements and the “microcosmic” elements by fuzzy inference causes the output melody to have musically meaningful structures.
The FR method can be generalized to the generation of music of other types by modifying some details, such as the intervals, the space of the pitches, and the fuzzy rules. Figure 15 shows an example of a minor-mode melody, which is also structured and musical.

An example of generalization.
To create complete melodies in the Chinese national style, with prairie songs as the musical background, this paper has proposed a methodology of intelligent composition that is based on theme development and fuzzy inference, along with a random function. Following [24], this paper mainly aims to solve the macroscopic control problem of generating music, which involves two aspects. The first aspect is the generation of a theme phrase that is constrained by the fuzzy rules and is free from the rigid rules to create a balance between monotony and chaos, which is important not only to the traditional culture of China but also to the music culture of the world. This generation process manages the local structure of the music, which is an important factor in generating interesting music. The other aspect is global structure control, which corresponds to the musical form theories. The fuzzy inference of musical form is the control of the phrase-relation progression, which is used not only to represent the prairie style but also to make the output results better satisfy the unification-contrast regularities of melodics and thus be more musical. This control work is another important factor in generating interesting music that can incorporate the effect of symmetry and that can strengthen the balance between monotony and chaos [36]. The method in this paper can produce structured, multiple and coherent melodies of PNSC, and it is possible to generalize the proposed approach to generate other styles of music by modifying various technological details.
The limitations of the proposed technique involve the processing of other pitches in addition to the five specified pitches (gong, shang, jue, zhi, and yu, which are also called normal pitches). In musicology, the offset of pitches is a common method of developing a melody. It is possible that a normal pitch after being offset is no longer a “normal” pitch but a “partial” pitch. For example, “jue” up one semitone is commonly called “qing-jue”, and “gong” down one semitone is called “bian-gong”. Both “qing-jue” and “bian-gong” are “partial” pitches that are allowed to exist in PSNC after being processed because they are unstable. This paper has adopted the approach of decreasing their durations to reduce their influence on the clarity of the musical style. However, there is still much work to be done. This is a problem that must be further researched and involves both the quality of music and the clarity of musical style.
Footnotes
Acknowledgments
This research was funded by the National Natural Science Foundation of China(No. U1604154, U1704158), and the Young Core Instructor Project from the Higher Education Institutions of Henan Province, China (No.2011GGJS-061).
