Common and distinct quantitative characteristics of Chinese and Western music in terms of modes, scales, degrees and melody variations

Music is in general mutually understood among different cultures worldwide but can sometimes vary by different styles. The Western music system (heptatonic system) and the Chinese music system (pentatonic system) have common and different characteristics in terms of modes, scales, degrees, and melody variations. In this paper, we show these characteristics through quantitative analysis and comparison and have identified two common characteristics of Chinese pentatonic and Western heptatonic music with respect to modes, scales, and degrees. Although the structures and profiles of the modes, scales, and degrees of both kinds of music are different, they both show a preference to bright modes and scales, and their preference to tonal centres and degrees are consistent with the generating orders via their primal tuning temperaments. Based on the structural characteristics of the musical scales of Chinese pentatonic and Western heptatonic music, we present three interval-dividing metrics to examine the melody variations quantitatively. We find that the melody variations of Chinese pentatonic and Western heptatonic music measured by the interval-dividing metrics both follow the power law, a physical-mathematical law existing in many natural and engineering systems. This study fills the gap in the quantitative analysis of Chinese pentatonic music and provides an approach to studying the common characteristics of different types of music.


Introduction
Music plays an extremely important role in the history of human civilisation.Many commonalities are found in the music of different cultures and regions with a wide variety of musical features including pitch, rhythm, melodic structure, form, performance contexts, contents, and behaviours (Greenberg et al., 2022;Mehr et al., 2019;Savage et al., 2015).This means that, even though musical style varies across geographical and social areas, it is still possible for the music of one culture to be understood by people from another culture.Two fundamental questions are often raised: what are the common and distinct characteristics among the music of different cultures, and are there some quantitative metrics to measure and analyze these common and distinct characteristics?
To answer these two questions, many efforts have been made via quantitative and comparative studies to analyze music worldwide (Brown & Jordania, 2013;Mehr et al., 2019;Panteli et al., 2018) music is a significant way to understand different music and the worldwide music systems can be primarily categorised as the European music system (heptatonic system), the Chinese music system (pentatonic system), and the Persian-Arabian music system (three-quarter system) (Wang, 1990).It is important to note that these music systems are not wholly exclusive to any one area and can all be found across different geographic boundaries.The essential distinctions in three different music systems are the organisations of tonality and scales rather than geographic areas.This approach takes a primal quantitative metric in the analysis of worldwide music.The Western heptatonic system, particularly the major and minor modes, constitutes the fundamental framework of Western music and is more widely used around the world than the other two musical systems (Burkholder et al., 2014;Du, 2004;Li, 2000).Most of the quantitative studies that have been carried out to date have been conducted on Western music.In recent decades, statistical and signal-processing methods have been widely applied to analyze Western music quantitatively (Goienetxea et al., 2019;Savage et al., 2015;Whorley & Conklin, 2016).In particular, the rhythmic, harmonic and melodic structures of Western music have been quantified and studied (Goienetxea et al., 2019;Whorley & Conklin, 2016), and analyzed with advanced mathematical approaches including topology, geometry, category theory, and mathematical morphology (Andreatta, 2018;Popoff et al., 2015).Many structural models are established to quantify the musical modes, musical chords, and voice leadings.They often show the traditional harmonic relationships in European classical music (Andreatta, 2016;Noll, 2019;Tymoczko, 2006Tymoczko, , 2011)).Quantitative studies on non-Western music systems are also conducted but are far fewer in number.For example, Persian music was analyzed using a computational method to identify the tonic and scale (Heydarian & Jones, 2014); the sensorimotor synchronisation and asynchrony of North Indian classical instrumental music were explored by quantitative methods (Clayton et al., 2019); and the topology of complex networks was applied to represent the Turkish Makam music, a system of varied melodies and chords (Akkoc, 2002;Aktas et al., 2019).
The quantitative studies of modes, scales, and degrees.Musical modes, scales, and degrees are the fundamental elements of a music system (Zhao, 2013), and also the classification ground of different music systems worldwide.Many studies aim to quantify the structure, organisation, and properties of musical modes, scales, and degrees.For example, Cambouropoulos proposed General Pitch Interval Representation (GPIR) to represent pitch classes and pitch-class intervals and discussed two important applications of GPIR (Cambouropoulos, 1996).Quantisation of musical scales based on starconvex structures was studied to represent a general property across the world's musical scales (Honingh & Bod, 2011).The models for quantifying the pitch space, tonal pitch space, modal pitch space and the theory of well-formed modes were established (Lerdahl, 2001;Noll, 2019;Tsougras, 2003).Based on the structures and organisations of musical scales and degrees, the algorithms for finding musical modes including keys are developed by using a tone-profile technique.For example, the classic and widely used finding-key algorithms applied to Western major/minor music by Krumhansl (Krumhansl, 1990;Krumhansl & Kessler, 1982), and other algorithms for automatic key detection of non-Western music based on Krumhansl's algorithm (Aljanaki, 2011).These quantitative studies also provide the basis for colour perception and emotional evaluation of different music and many experimental studies have confirmed this.For example, the distribution of intervals, modes, and tonal strength can serve as the quantitative predictors to evaluate musical emotion along with four factors: valence, aesthetic judgment, activity, and potency (Costa et al., 2004).Efforts were made on the different reactions of perceived brightness and happiness of Western musical modes and scales and the conclusions drawn were that major modes and scales are more common than minor, and positive valence is more common than negative (Bowling et al., 2010;Collier & Hubbard, 2004;Parncutt, 2014;Tan & Temperley, 2013;Tan & Temperley, 2017).
Power law in melody variations.Melody variations of Western tonal music statistically observe a physicalmathematical law named the power law, which is universal in many natural, social, and engineering systems.Hsü found that the Probability Density Functions (PDFs) of the melody variations measured by semitones of several piano sonatas have fractal characteristics, namely power law (Hsü & Hsü, 1990).Brothers suggested that Bach's cello suites display the power-law scaling in the melodic interval and its derivative, melodic moment (Brothers, 2009).Another study showed a common property in melody variations of human songs where the number of semitones between each pair of successive notes also follows the power law (Mehr et al., 2019).In our most recent study, three mathematical characteristics were discovered based on composition theory, which we derived that the melody variations of tonal music melody also observe the power law (Nan et al., 2022;Nan & Guan, 2023).
However, little attention has been paid to quantitatively analyzing Chinese traditional music, neither on modes, scales, and degrees nor on melody variations.Chinese traditional music contains compositions inherited from ancient China and those developed in the modern era.Because of the various different Chinese ethnic groups, Chinese traditional music includes all three music systems: the European music system (heptatonic system), the Chinese music system (pentatonic system), and the Persian-Arabian music system (three-quarter system).Most ethnic groups, including the Han Chinese and other minorities, use the Chinese pentatonic system, with the exception of the Russian ethnic group.Uyghur, Tajik, and Uzbek groups use the Persian-Arabian music system in addition to the Chinese and European music systems (Du, 2004).In general, Chinese pentatonic music is the most widely used system in China and we focus on this music system in this paper.To facilitate an understanding of the similarities and differences between Western heptatonic and Chinese pentatonic music, it is ideal to analyze Chinese pentatonic music quantitatively from two aspects: (1) basic musical elements such as modes, scales, and degrees; (2) melody variations.
However, there are many challenges and difficulties in quantitatively analyzing Chinese traditional music.On the one hand, the basic theory of Chinese traditional music is mainly on 'musical tuning temperament' in ancient China (Du, 2004;Tong, 1926;Wang, 1990Wang, , 2019)).However, many important musical phenomena lack appropriate terminology for summary, and many concepts lack standardised explanations (Du, 2004;Tong, 1926;Wang, 1990Wang, , 2019)).On the other hand, in the area of music information retrieval, Western music accounts for the largest proportion of databases, while the databases for Chinese traditional music are limited (Li & Han, 2020;Xie & Gao, 2022).Until recently, only a few databases were developed for Chinese traditional music (Li et al., 2018;Liu & Li, 2021;Xie & Gao, 2022).However, we have not found a specific musical instrument digital interface (MIDI) database for Chinese traditional music.
This paper reports a MIDI database built by the authors for Chinese pentatonic music with four genres: Chinese Folk Songs (CFS), Chinese Traditional Instrumental Music (CTIM), Chinese Opera (CO), Chinese Popular Music (CPM), and a MIDI database collected for Western heptatonic music with eight genres/periods: Classicism (Class.),Romanticism (Romant.),nineteenth Century Opera (19thCO), Nationalism (Natl.),Impressionism (Impr.),Neoclassicism (Neoclass.),and Popular Music (Pop) (details in Supplementary Material).The paper focuses on the quantitative analysis and comparison of Western heptatonic music and Chinese pentatonic music in modes, scales, degrees, and melody variations.We present the quantitative metrics to analyze the three fundamental musical elements and examine the power law in melody variations of the two different kinds of music.Then three common features of Chinese pentatonic music and Western music are obtained: (1) preferring the bright and happy musical modes and scales; (2) preferring the tones by the generating orders based on their primal tuning temperaments; (3) melody variations both observe the power law if the melodic intervals are measured by an appropriate interval-dividing metric.
Moreover, there are two distinct characteristics of the two kinds of music: (1) different structures of modes, scales, and degrees; (2) different parameters of the power-law distribution on melody variations varying with different musical genres.
The common and distinct characteristics of the fundamental music elements: modes, scales, degrees, and melody variations, reveal the universal characteristics of Western heptatonic music and Chinese pentatonic music.It also promotes an understanding of other musical systems, such as the Persian-Arabian music system (three-quarter system).
2. Quantitative analysis I: modes, scales, and degrees of Western heptatonic and Chinese pentatonic music

Fundamental terms of Western heptatonic and Chinese pentatonic music
Different musical systems have their specific structures of basic musical tones and varying laws of organisation, similar to painting with a limited 'palette' (Chua, 1991).For a particular music system, the overall musical tones can be regarded as a set, and these tones arranged in an ascending/descending order constitute a tone sequence.
In Western music theory (Benward et al., 1999;Christensen, 2006;Li, 2000;Randel, 2003;Sadie & Tyrrell, 2001;Zhao, 2013), composition is to select several tones (usually no more than seven) from the tone sequence, and organise them with a specific structure including a definite tonal centre (named tonic) and a community of organised tones.This constitutes a musical system named tonality or synonymous with key.Tonality specifies pitch relationships and triadic chords, where the ending of a music piece has a feeling of return and resolution.The organised relationships of tones are with reference to a definite centre, which is called tonic (Randel, 2003).Key usually identifies the tonic note and/or the tonic triad.An example of tonality is C major or A minor.Mode is another important musical concept involving an ordered sequence of notes and melody patterns.From the tone sequence, several tones are selected and organised according to a specific interval relation.These tones constitute mode.A collection of pitches arranged in order from the lowest to the highest or from the highest to the lowest is a scale.The tones from the current tonic to the tonic of another octave in a musical mode are called the mode scale, where the individual tone is named a scale degree according to their ordinal numbers in the scale.
In ancient Greece, different forms of the heptatonic modes such as Ionian, Dorian, Phrygian, Lydian, Mixolydian, Aeolian, and Locrian originated, and later developed during the Medieval and Renaissance period.The major and minor modes evolved from these modes, and have become the most commonly used modes in Western music since the seventeenth century (Christensen, 2006;Sadie & Tyrrell, 2001).
In this paper, we focus on the major and minor modes in Western heptatonic music.The scale degrees of the major and minor modes are as follows: 1/I tonic, 2/II supertonic, 3/III mediant, 4/IV subdominant, 5/V dominant, 6/VI submediant, 7/VII leading tone or subtonic, and the most important degrees are I, IV, and V, which form the support of two fifths.The major scales have a major third between the tonic and the third above it with stable tones forming a major triad; the minor scales have a minor third between the tonic and the third above it with stable tones forming a minor triad.The major scale generally has one form and the minor scales have three forms: the natural scale, the harmonic scale, and the melodic scale (Randel, 2003;Sadie & Tyrrell, 2001).The major scale formation and the three minor scale formations are demonstrated in Figures 1 and 2.Moreover, since each of the twelve pitches (named ) in an octave can be the starting note of the mode or scale, namely tonic, each Western heptatonic mode has 12 tonalities/keys, such as C major or D minor (Benward et al., 1999;Li, 2000).
The concepts of tonality and modality in Chinese traditional music share similarities with those in Western music theory.However, the formations of tonality, referring to the concrete structures of the tonalities such as the tones that make up a mode scale and their interrelationships, of the two systems are different from each other.The Chinese music system, i.e. the pentatonic system, has dominated Chinese traditional music for more than two thousand years (at least from the Chun Qiu Period, BC 770 -BC 476) (Du, 2004;Du & Qin, 2007;Ho & Han, 1982;Li, 1981;Li, 2004;Liu, 2006;Zhao, 2013).The Chinese pentatonic scales (i.e.five-tone scales) consist of five tones/degrees named Gong, Shang, Jue, Zhi, and Yu (Du, 2004;Du & Qin, 2007;Ho & Han, 1982;Li, 1981).Each pentatonic degree can serve as the tonal centre, like the tonic in Western music, named tonal head (Diaotou in Chinese) in Chinese traditional music theory (Du, 2004;Du & Qin, 2007).The tonal head determines the pentatonic mode.For example, when the Gong tone is the tonal head, the mode is named Gong mode.The five pentatonic modes (Gong mode, Shang mode, Jue mode, Zhi mode, and Yu mode), which share the same Gong tone and have the same degrees, are named the Tonggong system.The scale-degree formations of pentatonic modes in a Tonggong system are shown in Figure 3.The concepts of modes/scales in a Tonggong system are similar to the relative modes/scales in Western music theory.Gong tone of the Tonggong system is called tone master (Yinzhu in Chinese).The inner structures of the modes/scales and the hierarchy of degrees in the Chinese pentatonic system can be described as follows.The functions of the five degrees in the pentatonic modes are classified into the tonal centre (tonal head or tonic), level I support tone(s) that form a fifth with the tonal centre, and level II support tone(s) that form a second with the tonal centre.For example, the tonal centre (tonal head or tonic) of the Shang mode is Shang; level I support tones are Yu and Zhi; and level II support tones are Gong and Jue (Zhao, 2013).The core of scale-degree organisation of the five pentatonic modes is the three-tone groups with two intervals: the major second and the minor third.These three-tone groups are classified into two types: the first type with a major second and a minor third (two three-tone groups with different order of the two intervals), and the second type with two major seconds.The combinations of the two types of three-tone groups form the five modes (see Figure 3).
The five pentatonic scales are the essential parts forming the hexatonic (six-tone) and heptatonic (seven-tone) scales in the Chinese music system (Du, 2004;Du & Qin, 2007;Ho & Han, 1982;Li, 1981;Li, 2004;Zhao, 2013).The hexatonic scale consists of the pentatonic scale and another added tone (the added tone divides a minor third in the pentatonic scale into a minor second and a major second).A more common scale is the heptatonic scale, consisting of the pentatonic scale and  a specific added tone pair.Each hexatonic and heptatonic scale has five modes with the five pentatonic tones as the tonal head (tonic), like the pentatonic scale.There are mainly three heptatonic scales in the Chinese music system, the first scale/mode named the Zhengsheng scale (commonly known as the Yayue scale or Chinese ancient mode), the second scale/mode named the Xiazhi scale (commonly known as the Qingyue scale or new mode), and the third scale/mode named the Qingsheng scale (commonly known as the Yanyue scale or Yan mode), respectively, which differ in the added tone pairs.The Zhengsheng scale is: Gong (1), Shang (2), Jue (3), Bianzhi ( # 4), Zhi (5), Yu (6), Biangong (7); the Xiazhi scale is: Gong (1), Shang (2), Jue (3), Qingjue (4), Zhi (5), Yu (6), Biangong (7); and the Qingsheng scale is: Gong (1), Shang (2), Jue (3), Qingjue (4), Zhi (5), Yu (6), Run ( b 7) (Du, 2004;Wang, 2019;Zhao, 2013).The four degrees: Qingjue (4), Bianzhi (the 4th degree and equal to # 4 in Western music), Run (the 7th degree and equal to b 7 in Western music) and Biangong (7) are the added tones and also the 4th and 7th scale degrees in the heptatonic Gong mode.The three heptatonic scales are demonstrated in Figure 4.In Chinese pentatonic music, the five pentatonic tones hold an important place while the added tones are usually less frequent and never appear in important rhythmic positions (Zhao, 2013).However, these added tones form semitones with their neighbouring tones and bring more colours to the scales.
In Chinese traditional music theory, the twelve pitches of an octave are named twelve Lüs: Huangzhong, Dalü, Taizu, Jiazhong, Guxian, Zhonglü, Ruibin, Linzhong, Yize, Nanlü, Wuyi, and Yingzhong, corresponding to (Du, 2004;Du & Qin, 2007;Wang, 2019).However, in either the pentatonic scales or the heptatonic scales of Chinese traditional music, the pitch of the Gong tone in the Tonggong system determines the other pitches of scale degrees, and Yun is employed to denote the tonal pitch.Therefore, the pitch of Gong is the Yun signature (Du, 2004).Yun and Gong can be regarded as synonyms here.Each Yun/Gong has five tonal heads (constituting five modes) and the starting pitch (i.e.Lü) of each Yun/Gong is the tone master.Every twelve pitch (Lü) in an octave can be a Yun, so there are 12 Yuns and 60 tonalities/keys (Du, 2004).'Gong' in Chinese pentatonic music theory usually has four meanings: as a degree, as a mode, as the Tonggong system, and as the signature of tonal pitch equivalent to Yun.
We note that the Western natural scale and the Chinese Xiazhi scale both belong to the heptatonic scale and hold the same form.However, their inner structures and relationships are different.In the Chinese Xiazhi scale, every pentatonic scale degree can act as the tonal centre (i.e.tonal head or tonic) and form five modes.The structures and relations among the five pentatonic tones constitute the skeleton of the Chinese Xiazhi scale, which provides powerful and structural support.The two added tones, Qingjue and Biangong, possess much weaker positions than the five pentatonic tones.In the Western natural scale, usually only two scale degrees serve as the tonal centre (tonic), leading to the major and minor modes.The tonic, subdominant, dominant (i.e.I, IV, and V) and the two fifths constitute the structural skeleton of the Western natural scale (Du, 2004;Wang, 1990Wang, , 2019)).The comparison between the above heptatonic scales in Chinese and Western music is demonstrated in Figure 5.The modes, scales, and degrees provide the fundamentals of Western heptatonic music and Chinese pentatonic music and specify their organisation and development of harmony and melody.The common and distinct characteristics between the two music systems are discussed next.

The distributions of essential musical elements and their chromatics analysis
The distributions of the essential musical elements in Western heptatonic music and Chinese pentatonic music in the MIDI databases are presented first.In Western heptatonic music, although there are three forms of the minor scales, a music piece is in a minor mode, rather than the melodic minor mode or harmonic minor mode (Benward et al., 1999).Therefore the distributions of major and minor modes and those of the tonality/key of Western heptatonic music need to be calculated.In contrast, the Gong tone and the five modes in the Tonggong system hold extremely important positions in Chinese pentatonic music, while the customs and limits of multiple tonalities/keys vary at different times (Du, 2004;Wang, 2019).This paper focuses on the five pentatonic modes and three important heptatonic scales of the Tonggong system.
The modes and tonalities/keys of Western major/ minor music can be obtained by the Krumhansl & Schmuckler key-finding algorithm (Krumhansl, 1990;Krumhansl & Kessler, 1982).The process of determining the mode of a Chinese pentatonic music piece is as follows.First, the final tone of the Chinese pentatonic music piece is analyzed to determine the tonal centre (tonal head or tonic).Then, an 'ideal' profile is constructed by sorting the tones starting from the tonal centre based on the five Chinese pentatonic mode scales in a Tonggong system.The scale degrees are assigned a value of 1, while the other tones are assigned a value of 0, and the results are then normalised.Next, the strength of each mode is assessed by examining its correlation with the degree distribution of the piece.The mode of a piece of Chinese pentatonic music is thus determined.The mode or tonality/key distributions of Chinese pentatonic music and Western heptatonic music are shown in Figures 6 and 7.It is found that the modes of Chinese pentatonic music are generally in order of Zhi, Gong, Yu, Shang, and Jue.Among the four genres without Jue, their distributions are different.In Chinese Folk Songs (CFS), Zhi mode and Yu mode have the same important status.Gong mode plays a critical role in Chinese Traditional Instrumental Music (CTIM), and Zhi mode is the most preferred in Chinese Opera (CO).In Chinese pentatonic popular music, Yu mode is the most common, followed by Gong mode, Shang mode, etc.Among the above four genres, Jue mode is the least used.In Western major and minor music for comparison (Figure 7), the proportion of the major modes is higher than the minor modes based on our analysis, consistent with the results in literature (Parncutt, 2014).The tonality/key proportions of the major mode decrease with the order of C, D, G, E, F, E b , B b , etc.It is found that G, D, and A, as minor modal tonics, occupy the highest proportions, even more than C and F.   Second, the degree distributions of Chinese pentatonic music and Western heptatonic music are demonstrated in Figure 8.It is seen that Gong (1), Shang (2), Jue (3), Zhi (5), Yu (6) of Chinese pentatonic music are significantly higher versus the added tones and the alterations.The occurrences of Qingjue (4) and Biangong (7) are nearly the same and more common than Bianzhi ( # 4) and Run ( b 7), which indicates that the Xiazhi scale occurs frequently.The distribution also shows that the alterations rarely appear in Chinese pentatonic music.However, in Western heptatonic music, all twelve degrees are used, and the tonic ( 1) is found at the most important position followed by the dominant (5).In contrast, # 1/ b 2 and # 4/ b 5 appear less frequently.
The three heptatonic scale distributions of the Chinese music system: the Xiazhi scale, the Zhengsheng scale, and the Qingsheng scale are shown in Figure 9.It is seen that the Xiazhi scale occurs most frequently, especially in Chinese opera and Chinese traditional instrumental music in line with the fact that Qingjue and Biangong are more common than Bianzhi and Run as shown in Figure 8.In contrast, the Zhengsheng scale is used less frequently than the Xiazhi scale, and the Qingsheng scale rarely occurs.Moreover, the heptatonic scales are used less in Chinese folk songs and Chinese popular music than in the other two genres.
The distributions of musical mode, degree, and scale may reflect the human preference for music colour and serve as an indicator of perceived emotion (Bowling et al., 2010;Collier & Hubbard, 2004;Costa et al., 2004).It is widely accepted that major and minor modes and scales of Western music have expressive implications.Major music is perceived to be bright and happy, whereas minor music is perceived to be gloomy or wistful (Bowling et al., 2010;Collier & Hubbard, 2004;Parncutt, 2014).In our analysis of Western heptatonic music, major mode and scale, the brightest songs are the most common, meaning that most people prefer the bright and happy modes and scales.This is consistent with results from previous studies (Parncutt, 2014;Tan & Temperley, 2013).
In Chinese pentatonic music, the emotion of bright or dim is extracted from the scale structure with the three-tone groups as shown in Section 2.1 and Figure 3 (Du, 2004;Zhao, 2013).For the first type of the threetone group, if the major second is below the minor third, the colour is bright, called Zhi color; while if the minor third is below the major second, the colour is dim, called Yu color (Du, 2004).The Zhi mode contains two threetone groups of Zhi color, which reflects that Zhi mode is the brightest mode, while the Yu mode with two threetone groups of Yu color exhibits the dimmest colour.Gong mode contains a three-tone group of Zhi color and Jue mode contains a three-tone group of Yu color, and Shang mode contains a three-tone group of Zhi color and a threetone group of Yu color is considered an intermediate colour.
By combining the above colour analysis with the mode distribution of Chinese pentatonic music (Figure 6), it is found that the preference for bright music emotion in Western major/minor music also exists in Chinese pentatonic music.Zhi mode, with a strikingly bright colour (the scale consists of two three-tone groups of Zhi color), is the most common mode in Chinese pentatonic music, especially in Chinese folk songs and Chinese opera.Gong mode is second only to Zhi mode in terms of brightness and is also used frequently in Chinese pentatonic music.Yu mode, the dimmest colour among the pentatonic modes, is in the middle of the overall distribution and is very common in Chinese folk songs and popular music.Shang mode, an intermediate colour, appears less than the above three modes.Jue mode, only containing a Yu color three-tone group, is the least used mode.Therefore, it is clear that Chinese pentatonic music tends to use bright modes and scales.
In conclusion, a preference to bright modes and scales is a common characteristic of Chinese pentatonic music and Western heptatonic music.

Temperament analysis
The above analysis shows the distinct characteristics between Chinese pentatonic music and Western heptatonic music in terms of the structures and distributions of the modes, scales, and degrees.A natural question is why the modes, scales, and degrees are different between the two music systems.Musical temperament determines the pitches of musical tones and creates the tones of the scale.A review of the primal tuning temperaments of the different music systems could help answer the question and analyze other common and distinct characteristics between the two music systems.
In ancient China, the pentatonic scale was created by San-fen-sun-yi (addition or subtraction of one-third, or the up and down principle, or 3-section temperament for short) (Dai, 1992;Hua, 2015), recorded in two classic books before the Qin Dynasty.The procedure, according to the records in Diyunpian of Guanzi in the 4th century BC, is described in Table 1.First, give the number 81 as the basic measurement of a string length to decide the first tone named Gong.The number 81 comes from ancient Chinese wisdom: 'One begets two, two begets three, three begets nine, nine begets all things, all things change, and after nine times nine namely eighty-one, the cycle returns to one.'Then divide the number 81 into three equal sections, and add or subtract a section to produce other tones in turn (Wang, 2019).The five pentatonic tones are then obtained.If we transpose the tones, initially far from one another in Table 1, and arrange them within the space of one-octave tones, then we have a pentatonic Zhi mode, whose scale is Zhi, Yu, Gong, Shang, and Jue.Another description of the 3-section temperament was recorded in Yinlüpian, Lüshichunqiu of Shiji (history records in 104 -91 BC) (Table 2), which stated a slightly altered procedure from the above recording.It builds a pentatonic Gong mode, whose scale is Gong, Shang, Jue, Zhi, and Yu.It is noted that if we continue the procedure of addition or subtraction of one-third, we can also obtain a heptatonic scale and a twelve-tone scale.
The first musical scale of the European music system appeared about 2500 years ago (Hindemith, 2015;McLean, 2001;Patel, 2008;Randel, 2003).The frequency ratios 2:1 and 3:2 of the intervals in the scale correspond to the octave and the perfect fifth in the harmony series.A fifth is established on either side of a given tone, which results in the fifth and fourth as the backbone of the scale.Then, the procedure of Pythagorean tuning is described as follows.First, we get G above the given C and F 1 below the given C. Second, above the fifth C-G and below the fifth F 1 -C, we construct another pair of fifths G-D 1 and B b 2 -F 1 .Continuing this procedure, we can obtain two rows of twelve-tone series from the two sides as follows: By collecting the tones of the above two series from the five steps of the upward fifths and the first step of the downward fifth and then gathering its overall tones together by octave transposition, a heptatonic scale is constructed (Hindemith, 2015).According to the procedure of the temperament, we can write the degrees of the Western natural scale in the following sequence: F, C, G, D, A, E, B. It is noted that, in the heptatonic sequence, F is the only tone chosen from the downward series and there is a fifth between each pair of tones in the sequence.Moreover, we note that both Pythagorean tuning and 3-section temperament can be applied to build a twelvetone scale with different tunings in an octave: 1, # 1/ b 2, 2, # 2/ b 3, 3, 4, # 4/ b 5, 5, # 5/ b 6, 6, # 6/ b 7, 7. Today, the most used musical temperament worldwide is the Twelve-Tone Equal Temperament (12-TET) with twelve tones in an octave.The frequency of octave-higher tone doubles and the frequency difference between each pair of two adjacent tones (semitone) is 2 1 12 (Du, 2004;Hindemith, 2015;Wang, 2019).Since the difference in musical cents between two adjacent notes from the diverse tuning temperaments is too small to disturb our sense of hearing (Hindemith, 2015), we ignore the difference in musical cents among the three tuning temperaments.In fact, this paper focuses on the scale formations obtained from the primal tuning temperaments.
Comparing the distributions of mode, scale, and degree with the generating orders based on two tuning temperaments, we find that both Chinese pentatonic music and Western heptatonic music select tonics and degrees generally following the generating orders in their primal tuning temperaments.On the one hand, the preference of the modes is generally related to the distance from the tonal centre of this mode to the first tone (Gong or C) in the procedure of the tuning temperaments (rather than the physical or positional distance).In this sense, the distance from Gong to Zhi (or from C to G) is closer than that from Gong to Biangong (or from C to B). Roughly speaking, the closer the tonal centre of a Chinese pentatonic mode or a Western major mode is to Gong or C, the more frequently it will be used, and vice versa.Therefore, Chinese pentatonic music prefers Zhi mode and Gong mode, while Western heptatonic music generally prefers C, D, and G as the tonic, especially in the major modes.On the other hand, the proportion order of the degree distribution approximately corresponds to the generating orders based on the primal tuning temperaments.Gong (1) and Zhi (5) frequently appear both in Chinese pentatonic music and Western heptatonic music, followed by other scale degrees and alterations.
Moreover, Jue (3) in Chinese pentatonic music and 7/VII in Western heptatonic music appear less in comparison with the other scale degrees.
We can conclude that the preferences of tonal centres and degrees in the two music systems are both similar to the generating orders based on the primal tuning temperaments.

Quantitative metrics for measuring melody variations
Before we quantitatively analyze the melody variations, the Complementary Cumulative Distribution Function (CCDF) and the power law are introduced first.
For a random variable X, the CCDF T(x) of X is defined as the probability distribution larger than or equal to x, also called the tail distribution as CCDF is monotonically decreasing with lim where k > 0 and α > 0 are constants, the CCDF T(x) observes the power law (Clauset et al., 2009;Newman, 2005).The constant α of the distribution is known as the exponent or scaling parameter.If we take the logarithm of both sides of Eq. ( 2) as follows log T(x) = −α log x + log k (3) clearly log T(x) versus log x is a straight line geometrically with a gradient −α.The power-law distribution is considered a classical type of heavy-tail or fat-tail distribution (Clauset et al., 2009).
Power-law distributions exist in many natural, social, and engineering systems.It was first found in the distribution of personal wealth/income in economics by Pareto's work at the close of the nineteenth century, known as Pareto distribution (Pareto, 1896) and then the distribution of word frequency in linguistics, namely Zipf's law, found in the early twentieth century (Newman, 2005;Zipf, 1949).In fact, the power-law distribution is a common phenomenon such as the frequency of occurrence of unique words in a novel, the number of species in nature, the intensities of earthquakes, the sizes of forest fires, personal wealth or income, the human populations of cities, the number of web links, collaborations of film actors/actresses, and the number of academic papers authored or co-authored (Clauset et al., 2009;Newman, 2005).
The power law also exists in music melody variations.It is found that the distributions of melody variations of many Western classic works in semitones observe the power law (Hsü & Hsü, 1990;Mehr et al., 2019).A recent study explored the mechanism behind the power law of melody variations based on a more comprehensive study of various Western tonal music styles.Three mathematical characteristics of Western tonal music were found by quantifying music composition theory (Nan et al., 2022;Nan & Guan, 2023).A constrained entropy maximisation problem is then formulated and the CCDF T(i) of music melody variations in semitone i is rigorously derived as observing the power law as where c > 0 and D > 0 are constants.
In the above studies, the semitone is used as a metric to quantify the melody variations and the power law is found to be universal in melody variations of Western music.Then do power-law distributions exist in melody variations of Chinese pentatonic music?To answer this question, we first propose three interval-dividing metrics to quantify the melody variations of Western heptatonic music and Chinese pentatonic music based on the structures and organisations of the scales and degrees.
As we know the alterations, key changes, modulations, or transpositions are common in Western music where the heptatonic scale provides a basis for composing tonal music.Around 1900, there was a trend towards chromaticism, and then the twelve tones system was developed since then (Kostka, 2006;Schoenberg, 1984).In many quantitative studies of Western music, interval representation is often based on the twelve-tone scale or divided by semitones (Brothers, 2009;Costa et al., 2004;Hsü & Hsü, 1990;Mehr et al., 2019;Nan et al., 2022).Therefore, the semitone or the minor second is employed as the smallest quantitative unit of melody variation in Western music.If we denote the MIDI pitch number of the note n as p(n)(n = 1, 2, . . ., N), where N is the note length of the composition, then the semitone (based on the twelvetone scale) pitch variation between two adjacent notes is defined as follows Clearly, it is the twelve-tone interval-dividing metric.
In Chinese pentatonic music, melodies are generally organised by the pentatonic scale and the heptatonic scale, and usually develop within the Tonggong system (Du, 2004;Du & Qin, 2007;Li, 2004).Moreover, the melodic intervals between two adjacent notes are usually a major second, a minor third, and their combinations.Therefore, the stepwise motion in Chinese musical melodies often refers to the major second or the minor third (Du, 2004;Ho & Han, 1982).Based on this characteristic, we use the distance between two adjacent degrees in a scale as the quantitative unit of the melodic interval, that is, the scale-degree interval.Two quantitative metrics based on the pentatonic (fivetone) scales and the heptatonic (seven-tone) scales are then proposed.The first metric is defined as the five-tone interval-dividing metric based on the pentatonic scales: where s (5) (n)(n = 1, 2, . . ., N) denotes the numbered order of tone n in the pentatonic scales, with the s (5) (n) of Gong, Shang, Jue, Zhi, and Yu assigned the numbers 1, 2, 3, 4, and 5, respectively.The second metric is defined as the seven-tone interval-dividing metric based on the heptatonic scales: where s (7) (n)(n = 1, 2, . . ., N) denotes the numbered order of tone n in the heptatonic (seven-tone) scales.

Results and analysis
We To further analyze the different metrics, we apply the power-law function in Eq. ( 4) to fit the CCDFs calculated by the three quantitative metrics in Eq. (5-7).Figure 11 shows the fitting results as measured by adjusted-R 2 for the four Chinese musical genres and the eight Western musical genres/periods.It is seen that the overall fitting effect of the five-tone interval-dividing metric is the best, followed closely by the seven-tone interval-dividing metric and then the twelve-tone.The adjusted-R 2 s of the CCDFs of Chinese pentatonic music melody variations measured by semitone falls below 0.83, indicating that the melody variations of Chinese pentatonic music do not visibly observe the power law, but the power law is clear for the five-tone and seven-tone interval-dividing metrics.In contrast, the adjusted-R 2 s of the CCDFs in Western heptatonic music for the three quantitative metrics are about 0.83 or higher, while the results of those before Nationalism are about 0.88 or higher.Therefore, the five-tone and seven-tone interval-dividing metrics are more suitable for analyzing the melody variations of Chinese pentatonic music, and all three metrics are appropriate for analyzing the melody variations of Western heptatonic music.
It is interesting to analyze the fitting parameters c and D of the power law (Eq.4) as shown in Figure 12.We find that the values of c obtained by five-tone and seventone interval-dividing metrics for measuring Chinese pentatonic music and Western heptatonic music are quite close.The value c of twelve-tone interval-dividing metric

Conclusions
This paper presents the comparative analysis of Chinese pentatonic music and Western heptatonic music based on the measurements of the modes, scales, degrees, and melody variations with quantitative metrics.The 3-section temperament and Pythagorean tuning are reviewed and the mode and scale formations of the two music systems are compared.It is found that these two primal tuning temperaments describe the generating orders and three characteristics between Chinese pentatonic music and Western heptatonic music are as follows: (1) the overall distributions of the mode, scale, and degree are different; (2) similar preference in terms of bright modes and scales; (3) similar preference in terms of the tonal centres and the degrees consistent with the generating orders in their primal tuning temperaments.
The three quantitative metrics for measuring music melody variations are introduced: five-tone, seven-tone, and twelve-tone interval-dividing and the CCDFs of various Chinese pentatonic music and Western heptatonic music are calculated and analyzed.The results show that the power law in melody variations is a common property of the two music systems with the appropriate measuring metrics.The power-law exponents of the three intervaldividing metrics vary with the different musical genres of Chinese and Western music, indicating their different levels of decay degree of melody variations.
The quantitative analysis and comparison in the paper facilitate understanding of the different music systems and styles worldwide.The results show some of the basic mechanisms for the utilisation and organisation of the fundamental musical elements.The quantitative comparison of Chinese pentatonic music with Western heptatonic music suggests that they have similar preferences for musical emotion and observe the same law on melody variations.This study may inspire future investigation and analysis on world music by quantitative methods.The emotional context of Chinese pentatonic music such as whether Chinese pentatonic scales have the same emotional response as Western major/minor music warrants further study study.Moreover, we plan to conduct a series of experiments similar to the K-S algorithm and determine future tonic, modes, and system identifiers.

Disclosure statement
No potential conflict of interest was reported by the author(s).

Figure 1 .
Figure 1.The scale formation of the Western major mode, based on 12-TET.

Figure 2 .
Figure 2. The three scale formations of the Western minor modes, based on 12-TET.The descending melodic minor scale is consistent with the natural scale.

Figure 3 .
Figure3.The scale-degree formation of five Chinese pentatonic modes in a Tonggong system with the first degree as the tonal head (tonic) and Gong as the tone master.

Figure 4 .
Figure 4.The scale formation of three Chinese heptatonic scales, based on 12-TET.Each of the three heptatonic scales has five modes with the tonal heads (tonics) of Gong, Shang, Jue, Zhi, and Yu.

Figure 5 .
Figure 5.The Chinese Xiazhi scale, the Western C major scale and the Western A natural minor scale, based on 12-TET.

Figure 6 .
Figure 6.The mode distribution of the four Chinese musical genres: Chinese Folk Song (CFS), Chinese Traditional Instrumental Music (CTIM), Chinese Opera (CO) and Chinese Popular Music (CPM).

Figure 7 .
Figure 7.The mode and key distribution of Western major/minor music.

Figure 8 .
Figure 8. Proportions of twelve degrees of Chinese pentatonic music and Western heptatonic music.
) = 0.If the distribution T(x) obeys the following power function

Figure 10 .
Figure 10.Two columns of melody variation CCDFs measured by the three interval-dividing metrics, with Chinese pentatonic music in the left column and Western music in the right column.Case A, B, and C are the CCDFs of the melody variations of a folk song, Midu Shan'ge, from Yunnan, China measured by three interval-dividing metrics; Case D, E, and F are the results of Beethoven, Turkish March in B b Major, Op. 113, No. 4 measured by the same metrics.

Figure 12 .
Figure 12.The parameters c and D of the three interval-dividing metrics for the four Chinese musical genres (CFS, CTIM, CO, and CPM) and the eight Western musical genres/periods (Baroque to Pop).
. Classifying worldwide CONTACT Xiaohong Guan xhguan@xjtu.edu.cnCenter for Art & Science and Presentation & Communication, Frontier Institute of Science and Technology, Xi'an Jiaotong University, Xi'an, 710049 People's Republic of China; MOE KLINNS Lab, Faculty of Electronic and Information Engineering, Xi'an Jiaotong University, Xi'an, 710049 People's Republic of China; Center for Intelligent and Networked Systems, Tsinghua University, Beijing, 100084 People's Republic of China Supplemental data for this article can be accessed https://doi.org/10.1080/09298215.2024.2311650.