# A Multidimensional Scaling Analysis of Musical Sounds Based on Pseudo Phase Plane

Authors: Miguel F. M. Lima; J. A. Tenreiro Machado; António C. Costa
Journal: Abstract and Applied Analysis
 (2012)

---

## Abstract

This paper studies musical opus from the point of view of three mathematical tools: entropy, pseudo phase plane (PPP), and multidimensional scaling (MDS). The experiments analyze ten sets of different musical styles. First, for each musical composition, the PPP is produced using the time series lags captured by the average mutual information. Second, to unravel hidden relationships between the musical styles the MDS technique is used. The MDS is calculated based on two alternative metrics obtained from the PPP, namely, the average mutual information and the fractal dimension. The results reveal significant differences in the musical styles, demonstrating the feasibility of the proposed strategy and motivating further developments towards a dynamical analysis of musical sounds.


---

## Body

## 1. Introduction

For many centuries, philosophers, music composers, and mathematicians worked intensively to find mathematical formulae that could explain the process of music creation. As a matter of fact, music and mathematics are intricately related: strings vibrate at certain frequencies and sound waves can be described by mathematical equations. Although it seems not possible to find an expression that models the musical works, it is recognized that there are certain inherent mathematical structures in all types of music. Through the history of music, we have been faced with the proposal of formal techniques for melody composition, claiming that musical pieces can be created as a result of applying certain rules to some given initial material [1–12]. More recently, the growth of computing power made it possible to generate music automatically.The concept of entropy was introduced in the field of thermodynamics by Clausius (1862) and Boltzmann (1896) and was later applied by Shannon (1948) and Jaynes (1957) in information theory [13–15]. However, recently more general entropy measures were proposed, allowing the relaxation of the additivity axiom for application in several types of complex systems [16–24]. The novel ideas are presently under a large development and open up promising perspectives.The pseudo phase space (PPS) is used to analyze signals with nonlinear behavior. For the two-dimensional case it is called pseudo phase plane (PPP) [25–27]. To reconstruct the PPS it is necessary to find the adequate time lag between the signal and one delayed image of the original signal. To determine the proper lag (or time delay) often the mutual information concept is used.The Multidimensional Scaling (MDS) has its origins in psychometrics and psychophysics, where it is used as a tool for perceptual and cognitive modeling. From the beginning MDS has been applied in many fields, such as psychology, sociology, anthropology, economy, and educational research. In the last decades this technique has been applied also in others areas, including computational chemistry [28], machine learning [29], concept maps [30], and wireless network sensors [31].Bearing these facts in mind, the present study combines the referred concepts and is organized as follows. Section2 introduces a brief description of the fundamental concepts. Section 3 formulates and develops the musical study through several entropy measures and MDS analysis. Finally, Section 4 outlines the main conclusions.


## 2. Fundamental Concepts

This section presents the main tools adopted in this study, namely, the musical signals, the PPP, the fractional dimension, and the MDS.


### 2.1. Musical Sounds

In the context of this study, a musical work is a set of one or more time-sequenced digital data streams, representing a certain time sampling of the original musical source. For all musical objects, the original data streams result from sampling at 44 kHz, subsequently converted to a single (mono-) digital data series, each sample being a 32-bit signed floating value.These sounds have a strong variability, making difficult their direct comparison in the time domain. In this line of thought, several tests were developed to obtain methods that establish a compromise between smoothing the high signal variability and handling the rhythm and style time evolution that are the essence of each composition. The Shannon entropyS of the signals is shown to be an appropriate method:
(2.1)S=-∑x∈Xp(x)ln⁡[p(x)],
where X is the set of all possible events and p(x) is the probability that event i occurs so that ∑x∈Xp(x)=1.For a bidimensional random variable the join entropy becomes(2.2)S=-∑x∈X∑y∈Yp(x,y)ln⁡[p(x,y)].


### 2.2. Pseudo Phase Plane

The PPS is used to analyze signals with nonlinear behavior. The proper timelagTd, for the delay measurements, and the adequate dimension d∈N of the space must be determined in order to achieve the phase space. In the PPS the measurement s(t) forms the pseudo vector y(t) according to
(2.3)y(t)=[s(t),s(t+Td),…,s(t+(d-1)Td)].
The vector y(t) can be plotted in a d-dimensional space forming a curve in the PPS. If d=2 we have a two-dimensional space, and, therefore, the PPP is a particular case of the PPS technique.The procedure of choosing a sufficiently larged is formally known as embedding and any dimension that works is called an embedding dimension dE. The number of measurements dE should provide a phase space dimension, in which the geometrical structure of the plotted PPS is completely unfold and where there are no hidden points in the resulting plot.Among others [26], the method of delays is the most common method for reconstructing the phase space. Several techniques have been proposed to choose an appropriate time delay [27]. One line of thought is to choose Td based on the correlation of the time series with its delayed image. The difficulty of correlation to deal with nonlinear relations leads to the use of the mutual information. This concept, from the information theory [32], recognizes the nonlinear properties of the series and measures their dependence. The average mutual information for the two series of variables t and t+Td is given by
(2.4)I(t,t+Td)=∫t∫t+TdF1{s(t),s(t+Td)}log2F1{s(t),s(t+Td)}F2{s(t)}F3{s(t+Td)}dtd(t+Td),
where F1{s(t),s(t+Td)} is a bidimensional probability density function and F2{s(t)} and F3{s(t+Td)} are the marginal probability distributions of the two series s(t) and s(t+Td), respectively.The indexI allows us to obtain the time lag required to construct the pseudo phase space. For finding the best value Td of the delay, I is computed for a range of delays and the first minimum is chosen. Usually I is referred [25–27] as the preferred alternative to select the proper time delay Td.


### 2.3. Fractal Dimension

The fractal dimension is a quantity that gives an indication of how completely a spatial representation appears to fill space. There are many specific methods to compute the fractal dimension [33, 34]. The most popular methods are the Hausdorff and box-counting dimensions. Here the box-counting dimension method is used due to its simplicity of implementation and is defined as
(2.5)fd=lim⁡ε→0ln⁡[N(ε)]ln⁡(1/ε),
where N(ε) represents the minimal number of covering cells (e.g., boxes) of size ε required to cover the set analyzed. The slope on a plot of ln[N(ε)] versus ln(1/ε) provides an estimate of the fractal dimension.


### 2.4. Multidimensional Scaling

MDS is a generic name for a family of algorithms that construct a configuration of points in a low-dimensional space from information about interpoint distances measured in high-dimensional space. The new geometrical configuration of points, preserving the proximities of the high dimensional space, facilitates the perception underlying structure of the data and often makes it much easier to analyze. The problem addressed by MDS can be stated as follows: givenn items in an m-dimensional space and an n×n matrix C of proximity measures among the items, MDS produces a p-dimensional configuration Φ,p≤m, representing the items such that the distances among the points in the new space reflect, with some degree of fidelity, the proximities in the data. The proximity measures the closeness (in MDS terms usually referred as similarities) among the items and, in general, it is a distance measure: the more similar two items are, the smaller their distance is.The Minkowski distance metric provides a general way to specify distance for quantitative data in a multidimensional space:(2.6)dij=(∑k=1mwk|xik-xjk|r)1/r,
where m is the number of dimensions, xik is the value of the kth component of object i, and wk is a weight factor.Forwk=1, if r=2 then (2.6) yields the Euclidean distance, and if r=1 then it leads to the city-block (or Manhattan) distance. In practice, the Euclidean distance is generally used, but there are several other definitions that can be applied, including for binary data [35].Typically MDS is used to transform the data into two or three dimensions for visualizing the result to uncover the data hidden structure, but anyp<m is possible. Some authors use a rule of thumb to determine the maximum number of m, which is to ensure that there are at least twice as many pairs of items than the number of parameters to be estimated, resulting in m≥4p+1 [36]. The geometrical representation obtained with MDS is indeterminate with respect to translation, rotation, and reflection [37].There are two forms of MDS, namely, the metric MDS and the nonmetric MDS. The metric MDS uses the actual values of dissimilarities, while nonmetric MDS effectively uses only their ranks [38, 39]. Metric MDS assumes that the dissimilarities δij calculated in the original m-dimensional data and distances dij in the p-dimensional space are related as follows:
(2.7)dij≈f(δij),
where f is a continuous monotonic function. Metric (scaling) refers to the type of transformation f of the dissimilarities and its form determines the MDS model. If dij=δij (it means f=1) and a Euclidean distance is used then we obtain the classical (metric) MDS.In metric MDS the dissimilarities between all objects are known numbers and they are approximated by distances. Therefore, objects are mapped into a low-dimensional space, distances are calculated and compared with the dissimilarities. Then objects are moved in such way that the fit becomes better, until an objective function (called stress function in the context of MDS) is minimized.In nonmetric MDS, the metric properties off are relaxed, but the rank order of the dissimilarities must be preserved. The transformation function f obeys the monotonicity constraint δij<δrs⇒f(δij)≤f(δrs) for all objects. The advantage of nonmetric MDS is that no assumptions need to be made about the underlying transformation function f. Therefore, it can be used in situations that only the rank order of dissimilarities is known (ordinal data). Additionally, it can be used in cases which there are incomplete information. In such cases, the configuration Φ is constructed from a subset of the distances, and, at the same time, the other (missing) distances are estimated by monotonic regression. In nonmetric MDS it is assumed that dij≈f(δij) and, therefore, f(δij) are often referred as the disparities [40–42] in contrast to the original dissimilarities δij, on one hand, and the distances dij of the configuration space, on the other hand. In this context, the disparity is a measure of how well the distance dij matches the dissimilarity δij.With further developments over the years, MDS techniques are commonly classified according to the type of data to analyze. From this point of view, the techniques are embedded into the following MDS categories [35, 42]: (i) one-way versus multiway: in K-way MDS each pair of objects has K dissimilarity measures from different replications (e.g., repeated measures); (ii) one-mode versus multimode: similar to (i) but the K dissimilarities are qualitatively different (e.g., distinct experimental conditions).There is no rigorous statistical method to evaluate the quality and the reliability of the results obtained by an MDS analysis. However, there are two methods often used for that purpose: the Shepard plot and the stress. The Shepard plot is a scatter plot of the dissimilarities and disparities against the distances, usually overlaid with a line having unitary slope. The plot provides a qualitative evaluation of the goodness of fit. On the other hand, the stress value gives a quantitative evaluation. Additionally, the stress plotted as a function of dimensionality can be used to estimate the adequatep-dimension (known as scree plot). When the curve ceases to decrease significantly the resulting “elbow” may correspond to a substantial improvement in fit.Beyond the aspects referred before, there are other developments of MDS that include Procrustean methods, individual differences models (also known as three-way models), and constrained configuration.In the Procrustean methods the data is analyzed by scaling each replication separately and then comparing or aggregating the different MDS solutions. The individual differences models scale a set ofK dissimilarity matrices into only one MDS solution. The procedure of constraints on the configuration (which Borg and Groenen called “confirmatory MDS” [43]) is used when the researcher has some substantive underlying theory regarding a decomposition of the dissimilarities and, consequently, tries to restrain the configuration space.


## 2.1. Musical Sounds

In the context of this study, a musical work is a set of one or more time-sequenced digital data streams, representing a certain time sampling of the original musical source. For all musical objects, the original data streams result from sampling at 44 kHz, subsequently converted to a single (mono-) digital data series, each sample being a 32-bit signed floating value.These sounds have a strong variability, making difficult their direct comparison in the time domain. In this line of thought, several tests were developed to obtain methods that establish a compromise between smoothing the high signal variability and handling the rhythm and style time evolution that are the essence of each composition. The Shannon entropyS of the signals is shown to be an appropriate method:
(2.1)S=-∑x∈Xp(x)ln⁡[p(x)],
where X is the set of all possible events and p(x) is the probability that event i occurs so that ∑x∈Xp(x)=1.For a bidimensional random variable the join entropy becomes(2.2)S=-∑x∈X∑y∈Yp(x,y)ln⁡[p(x,y)].


## 2.2. Pseudo Phase Plane

The PPS is used to analyze signals with nonlinear behavior. The proper timelagTd, for the delay measurements, and the adequate dimension d∈N of the space must be determined in order to achieve the phase space. In the PPS the measurement s(t) forms the pseudo vector y(t) according to
(2.3)y(t)=[s(t),s(t+Td),…,s(t+(d-1)Td)].
The vector y(t) can be plotted in a d-dimensional space forming a curve in the PPS. If d=2 we have a two-dimensional space, and, therefore, the PPP is a particular case of the PPS technique.The procedure of choosing a sufficiently larged is formally known as embedding and any dimension that works is called an embedding dimension dE. The number of measurements dE should provide a phase space dimension, in which the geometrical structure of the plotted PPS is completely unfold and where there are no hidden points in the resulting plot.Among others [26], the method of delays is the most common method for reconstructing the phase space. Several techniques have been proposed to choose an appropriate time delay [27]. One line of thought is to choose Td based on the correlation of the time series with its delayed image. The difficulty of correlation to deal with nonlinear relations leads to the use of the mutual information. This concept, from the information theory [32], recognizes the nonlinear properties of the series and measures their dependence. The average mutual information for the two series of variables t and t+Td is given by
(2.4)I(t,t+Td)=∫t∫t+TdF1{s(t),s(t+Td)}log2F1{s(t),s(t+Td)}F2{s(t)}F3{s(t+Td)}dtd(t+Td),
where F1{s(t),s(t+Td)} is a bidimensional probability density function and F2{s(t)} and F3{s(t+Td)} are the marginal probability distributions of the two series s(t) and s(t+Td), respectively.The indexI allows us to obtain the time lag required to construct the pseudo phase space. For finding the best value Td of the delay, I is computed for a range of delays and the first minimum is chosen. Usually I is referred [25–27] as the preferred alternative to select the proper time delay Td.


## 2.3. Fractal Dimension

The fractal dimension is a quantity that gives an indication of how completely a spatial representation appears to fill space. There are many specific methods to compute the fractal dimension [33, 34]. The most popular methods are the Hausdorff and box-counting dimensions. Here the box-counting dimension method is used due to its simplicity of implementation and is defined as
(2.5)fd=lim⁡ε→0ln⁡[N(ε)]ln⁡(1/ε),
where N(ε) represents the minimal number of covering cells (e.g., boxes) of size ε required to cover the set analyzed. The slope on a plot of ln[N(ε)] versus ln(1/ε) provides an estimate of the fractal dimension.


## 2.4. Multidimensional Scaling

MDS is a generic name for a family of algorithms that construct a configuration of points in a low-dimensional space from information about interpoint distances measured in high-dimensional space. The new geometrical configuration of points, preserving the proximities of the high dimensional space, facilitates the perception underlying structure of the data and often makes it much easier to analyze. The problem addressed by MDS can be stated as follows: givenn items in an m-dimensional space and an n×n matrix C of proximity measures among the items, MDS produces a p-dimensional configuration Φ,p≤m, representing the items such that the distances among the points in the new space reflect, with some degree of fidelity, the proximities in the data. The proximity measures the closeness (in MDS terms usually referred as similarities) among the items and, in general, it is a distance measure: the more similar two items are, the smaller their distance is.The Minkowski distance metric provides a general way to specify distance for quantitative data in a multidimensional space:(2.6)dij=(∑k=1mwk|xik-xjk|r)1/r,
where m is the number of dimensions, xik is the value of the kth component of object i, and wk is a weight factor.Forwk=1, if r=2 then (2.6) yields the Euclidean distance, and if r=1 then it leads to the city-block (or Manhattan) distance. In practice, the Euclidean distance is generally used, but there are several other definitions that can be applied, including for binary data [35].Typically MDS is used to transform the data into two or three dimensions for visualizing the result to uncover the data hidden structure, but anyp<m is possible. Some authors use a rule of thumb to determine the maximum number of m, which is to ensure that there are at least twice as many pairs of items than the number of parameters to be estimated, resulting in m≥4p+1 [36]. The geometrical representation obtained with MDS is indeterminate with respect to translation, rotation, and reflection [37].There are two forms of MDS, namely, the metric MDS and the nonmetric MDS. The metric MDS uses the actual values of dissimilarities, while nonmetric MDS effectively uses only their ranks [38, 39]. Metric MDS assumes that the dissimilarities δij calculated in the original m-dimensional data and distances dij in the p-dimensional space are related as follows:
(2.7)dij≈f(δij),
where f is a continuous monotonic function. Metric (scaling) refers to the type of transformation f of the dissimilarities and its form determines the MDS model. If dij=δij (it means f=1) and a Euclidean distance is used then we obtain the classical (metric) MDS.In metric MDS the dissimilarities between all objects are known numbers and they are approximated by distances. Therefore, objects are mapped into a low-dimensional space, distances are calculated and compared with the dissimilarities. Then objects are moved in such way that the fit becomes better, until an objective function (called stress function in the context of MDS) is minimized.In nonmetric MDS, the metric properties off are relaxed, but the rank order of the dissimilarities must be preserved. The transformation function f obeys the monotonicity constraint δij<δrs⇒f(δij)≤f(δrs) for all objects. The advantage of nonmetric MDS is that no assumptions need to be made about the underlying transformation function f. Therefore, it can be used in situations that only the rank order of dissimilarities is known (ordinal data). Additionally, it can be used in cases which there are incomplete information. In such cases, the configuration Φ is constructed from a subset of the distances, and, at the same time, the other (missing) distances are estimated by monotonic regression. In nonmetric MDS it is assumed that dij≈f(δij) and, therefore, f(δij) are often referred as the disparities [40–42] in contrast to the original dissimilarities δij, on one hand, and the distances dij of the configuration space, on the other hand. In this context, the disparity is a measure of how well the distance dij matches the dissimilarity δij.With further developments over the years, MDS techniques are commonly classified according to the type of data to analyze. From this point of view, the techniques are embedded into the following MDS categories [35, 42]: (i) one-way versus multiway: in K-way MDS each pair of objects has K dissimilarity measures from different replications (e.g., repeated measures); (ii) one-mode versus multimode: similar to (i) but the K dissimilarities are qualitatively different (e.g., distinct experimental conditions).There is no rigorous statistical method to evaluate the quality and the reliability of the results obtained by an MDS analysis. However, there are two methods often used for that purpose: the Shepard plot and the stress. The Shepard plot is a scatter plot of the dissimilarities and disparities against the distances, usually overlaid with a line having unitary slope. The plot provides a qualitative evaluation of the goodness of fit. On the other hand, the stress value gives a quantitative evaluation. Additionally, the stress plotted as a function of dimensionality can be used to estimate the adequatep-dimension (known as scree plot). When the curve ceases to decrease significantly the resulting “elbow” may correspond to a substantial improvement in fit.Beyond the aspects referred before, there are other developments of MDS that include Procrustean methods, individual differences models (also known as three-way models), and constrained configuration.In the Procrustean methods the data is analyzed by scaling each replication separately and then comparing or aggregating the different MDS solutions. The individual differences models scale a set ofK dissimilarity matrices into only one MDS solution. The procedure of constraints on the configuration (which Borg and Groenen called “confirmatory MDS” [43]) is used when the researcher has some substantive underlying theory regarding a decomposition of the dissimilarities and, consequently, tries to restrain the configuration space.


## 3. Study of Musical Sounds

This section develops the musical study using entropy applied to a large sample of representative musical works. Once having the entropy measurements, the corresponding time lags and the PPP are calculated. Finally, an MDS analysis is performed using two alternative criteria, namely, based on mutual information and fractal dimension.


### 3.1. Entropy Analysis of Musical Compositions

For the calculation of the entropyS is considered a rectangular window of duration T that slides over time t capturing a limited part of the signal evolution. Each new window overlaps 50% with the previous one. For the signal captured in the window a histogram of relative frequency of amplitudes is obtained and S(t) calculated. Several experiments demonstrated that a sampling window with width T=1 represented a good compromise between the original signal’s frequency (tenths of microseconds) and the musical piece’s duration (hundreds of seconds).Figure1 shows the evolution of several musical sounds viewed through the entropy versus time for a sliding window of T=1. The entropy curves represent four different compositions, namely, The Beatles: “Yellow Submarine,” Ella Fitzgerald: “Night and Day,” Mozart: “KV527 Minuet Don Giovanni,” and Stevie Wonder: “For Your Love.”Figure 1
EntropyS versus time t of four musical compositions using a sliding window of T = 1 second. Musical compositions—The Beatles: “Yellow Submarine,” Ella Fitzgerald: “Night and Day,” Mozart: “KV527 Menuet Don Giovani,” and Stevie Wonder: “For Your Love.”


### 3.2. Pseudo Phase Plane of Entropy Curves from Musical Compositions

Having established the concept of time evolution of the entropy measure for musical compositions, the question of how the entropies of compositions with different “types” are interrelated was investigated. Several music titles from different “types” were selected: “Classical” (49 titles), “Easy”(31), “Electro” (16), “Jazz” (50), “Brazilian Music” (18), “Portuguese Music” (17), “Pop and Rock” (167), “Rhythm Blues” (44), “Reggae” (15), and “Slow Rock” (19). These samples lead to a population of N=426 music titles.For each signalS(t) derived from the 426 compositions, the average mutual information I was calculated. For example, Figure 2 shows the average mutual information I versus lag Td of four musical compositions—The Beatles: “Yellow Submarine,” Ella Fitzgerald: “Night and Day,” Mozart: “KV527 Menuet Don Giovani,” and Stevie Wonder: “For Your Love.” The minimum of the average mutual information Imin and the corresponding delay yield (Td,Imin)={(14.3,0.6),(43.6,0.6),(9,1),(12.2,0.5)}, respectively. To reconstruct the PPP, the first minimum of I was considered. The corresponding PPPs are represented in Figure 3.Figure 2
Average mutual informationI versus lag Td of four musical compositions—The Beatles: “Yellow Submarine,” Ella Fitzgerald: “Night and Day,” Mozart: “KV527 Menuet Don Giovani,” and Stevie Wonder: “For Your Love.”PPP of four musical compositions: (a) The Beatles: “Yellow Submarine”; (b) Ella Fitzgerald: “Night and Day”; (c) Mozart: “KV527 Menuet Don Giovani”; (d) Stevie Wonder: “For Your Love.”
(a)
(b)
(c)
(d)UsuallyTd is just calculated for the PPP reconstruction. However, the time lag represents a “memory” of previous parts of the time series and, therefore, this information is related with the fractional dynamics embedded in the music [44–46]. Consequently, the value of Imin and the characteristics of the PPP chart obtained for Td are important details to be included in the MDS maps to be formulated in the next subsection.


### 3.3. Multidimensional Scaling Analysis of Musical Compositions

In order to reveal hypothetical relationships between the musical compositions the MDS technique is used. Two alternative metrics to compare objectsi and j were adopted, namely,
(3.1)cijI=e-(Imin⁡i-Imin⁡j)2,i,j=1,…,N,(3.2)cijfd=e-(fdi-fdj)2,i,j=1,…,N,
where N is the total number of music, cijI defined in (3.1) is based on the minimal of the average mutual information Imin, and cijfd defined in (3.2) is based on the fractal dimension fd of the reconstructed PPP.For each of the two indices a426×426 symmetrical matrix C with 1’s in the main diagonal was calculated and the MDS maps obtained.Figure4(a) shows the locus of the classic compositions obtained by MDS using cijI for the dimension p=3. The locus obtained with this exponential type of metric forms a curve. Due to space limitations we are only depicting the locus obtained for some individual types of music. The tests developed show that each type of music occupies a certain segment in the curve obtained for all the musical compositions (Figure 4(b)). Figures 4(c) and 4(d) depict two tests computed to evaluate the consistency of the results obtained by MDS analysis. The Shepard plot (Figure 4(c)) shows the fitting of the 3D configuration distances to the dissimilarities. The value of the stress function versus the dimension is shown in Figure 4(d), that allows the estimation of the adequate p-dimension. An “elbow” occurs at dimension two for a low value of stress, which corresponds to a significant improvement in fit. From the scree plot can be concluded that the improvement obtained for the increasing of the p-dimension from p=2 to p=3 is very low. Therefore, the 2D MDS configuration is appropriate.MDS usingcijI for (a) classic compositions; (b) all musical compositions tested; (c) Shepard plot for 3D; (d) scree plot.
(a)
(b)
(c)
(d)In this line of thought, Figures5(a)–5(c) show the 2D locus for the Classic, Pop and Rock, and Reggae types of music, respectively. The Classic music compositions (Figure 5(a)) occupy a segment of approximately 80% of the curve obtained for all the musical compositions tested (Figure 5(d)). This segment begins near one end of the curve. The Pop and Rock music is located over a segment of approximately 80% of the curve beginning near the other end (Figure 5(b)). Therefore, approximately 60% of the positions for these two types of music are superimposed in the center of the curve. For the Pop and Rock most of the positions are concentrated in the half of the segment positioned at the opposite side of the classic music. The Reggae music compositions are located over a limited zone near the center of the curve (Figure 5(c)). Figure 5(d) shows the curve obtained for the 426 musical titles tested. The Jazz zone is centered approximately in the middle of the curve and corresponds to the superimposed zone of the Classic and the Pop and Rock. The Rhythm Blues titles are located approximately in the same zone of that corresponding to the Reggae. The Slow Rock and the Electro types occupy approximately the same segment that corresponds to the Classic music, nevertheless in a scattered way near the end of the curve. The Easy type occupies a shorter segment than the one occupied by the Slow Rock and the Electro. Finally, the Brazilian and the Portuguese compositions occupy a segment that corresponds approximately to the Reggae one, but with a slightly shift to the side of the Classic music. The shift is more pronounced for the case of the Portuguese music.2D locus generated by MDS usingcijI for: (a) Classic; (b) Pop-Rock; (c) Reggae; all musical compositions tested.
(a)
(b)
(c)
(d)Figure6 depicts the Shepard plot that confirms the good fitting of the 2D configuration distances to the dissimilarities.Figure 6
Shepard plot for 2D MDS usingcijI.Figure7 shows the locus of the musical compositions obtained by MDS using the metric cijfd. Figures 7(a)–7(c) show the locus for the Classic, Pop and Rock, and Reggae types of music, respectively. The Classic music compositions form a segment located in one end of the curve (Figure 7(a)). The Pop and Rock musical opus occupies the most part of the curve in a scattered way, but with a slightly superimposition over the Classic (Figure 7(b)). The Reggae music compositions are located on a limited zone superimposed over the Classic and the Pop and Rock compositions (Figure 7(c)).2D locus generated by MDS usingcijfd for (a) Classic; (b) Pop-Rock; (c) Reggae; (d) all musical compositions tested.
(a)
(b)
(c)
(d)Figure7(d) shows the locus of the 426 musical titles. In general the relative positions for the others types of music are similar to those obtained for cijI. Nevertheless the positions achieved with the metric cijfd are represented in a curve shorter than the one obtained with cijI that occasionally can make the analysis difficult.Figure8 shows the scree and Shepard plots to evaluate the results obtained by MDS using cijfd. Again, an “elbow” occurs at dimension two for a low value of stress (Figure 8(a)), which corresponds to a significant improvement in fit. Additionally, the Shepard plot (Figure 8(b)) shows the fitting of the 2D configuration distances to the dissimilarities.Evaluation of MDS results usingcijfd: scree plot (a); Shepard plot for 2D (b).
(a)
(b)The results obtained with the proposed tools, namely, the MDS and the PPP, together with the tested metrics proved to be assertive methods to analyze the musical compositions.


## 3.1. Entropy Analysis of Musical Compositions

For the calculation of the entropyS is considered a rectangular window of duration T that slides over time t capturing a limited part of the signal evolution. Each new window overlaps 50% with the previous one. For the signal captured in the window a histogram of relative frequency of amplitudes is obtained and S(t) calculated. Several experiments demonstrated that a sampling window with width T=1 represented a good compromise between the original signal’s frequency (tenths of microseconds) and the musical piece’s duration (hundreds of seconds).Figure1 shows the evolution of several musical sounds viewed through the entropy versus time for a sliding window of T=1. The entropy curves represent four different compositions, namely, The Beatles: “Yellow Submarine,” Ella Fitzgerald: “Night and Day,” Mozart: “KV527 Minuet Don Giovanni,” and Stevie Wonder: “For Your Love.”Figure 1
EntropyS versus time t of four musical compositions using a sliding window of T = 1 second. Musical compositions—The Beatles: “Yellow Submarine,” Ella Fitzgerald: “Night and Day,” Mozart: “KV527 Menuet Don Giovani,” and Stevie Wonder: “For Your Love.”


## 3.2. Pseudo Phase Plane of Entropy Curves from Musical Compositions

Having established the concept of time evolution of the entropy measure for musical compositions, the question of how the entropies of compositions with different “types” are interrelated was investigated. Several music titles from different “types” were selected: “Classical” (49 titles), “Easy”(31), “Electro” (16), “Jazz” (50), “Brazilian Music” (18), “Portuguese Music” (17), “Pop and Rock” (167), “Rhythm Blues” (44), “Reggae” (15), and “Slow Rock” (19). These samples lead to a population of N=426 music titles.For each signalS(t) derived from the 426 compositions, the average mutual information I was calculated. For example, Figure 2 shows the average mutual information I versus lag Td of four musical compositions—The Beatles: “Yellow Submarine,” Ella Fitzgerald: “Night and Day,” Mozart: “KV527 Menuet Don Giovani,” and Stevie Wonder: “For Your Love.” The minimum of the average mutual information Imin and the corresponding delay yield (Td,Imin)={(14.3,0.6),(43.6,0.6),(9,1),(12.2,0.5)}, respectively. To reconstruct the PPP, the first minimum of I was considered. The corresponding PPPs are represented in Figure 3.Figure 2
Average mutual informationI versus lag Td of four musical compositions—The Beatles: “Yellow Submarine,” Ella Fitzgerald: “Night and Day,” Mozart: “KV527 Menuet Don Giovani,” and Stevie Wonder: “For Your Love.”PPP of four musical compositions: (a) The Beatles: “Yellow Submarine”; (b) Ella Fitzgerald: “Night and Day”; (c) Mozart: “KV527 Menuet Don Giovani”; (d) Stevie Wonder: “For Your Love.”
(a)
(b)
(c)
(d)UsuallyTd is just calculated for the PPP reconstruction. However, the time lag represents a “memory” of previous parts of the time series and, therefore, this information is related with the fractional dynamics embedded in the music [44–46]. Consequently, the value of Imin and the characteristics of the PPP chart obtained for Td are important details to be included in the MDS maps to be formulated in the next subsection.


## 3.3. Multidimensional Scaling Analysis of Musical Compositions

In order to reveal hypothetical relationships between the musical compositions the MDS technique is used. Two alternative metrics to compare objectsi and j were adopted, namely,
(3.1)cijI=e-(Imin⁡i-Imin⁡j)2,i,j=1,…,N,(3.2)cijfd=e-(fdi-fdj)2,i,j=1,…,N,
where N is the total number of music, cijI defined in (3.1) is based on the minimal of the average mutual information Imin, and cijfd defined in (3.2) is based on the fractal dimension fd of the reconstructed PPP.For each of the two indices a426×426 symmetrical matrix C with 1’s in the main diagonal was calculated and the MDS maps obtained.Figure4(a) shows the locus of the classic compositions obtained by MDS using cijI for the dimension p=3. The locus obtained with this exponential type of metric forms a curve. Due to space limitations we are only depicting the locus obtained for some individual types of music. The tests developed show that each type of music occupies a certain segment in the curve obtained for all the musical compositions (Figure 4(b)). Figures 4(c) and 4(d) depict two tests computed to evaluate the consistency of the results obtained by MDS analysis. The Shepard plot (Figure 4(c)) shows the fitting of the 3D configuration distances to the dissimilarities. The value of the stress function versus the dimension is shown in Figure 4(d), that allows the estimation of the adequate p-dimension. An “elbow” occurs at dimension two for a low value of stress, which corresponds to a significant improvement in fit. From the scree plot can be concluded that the improvement obtained for the increasing of the p-dimension from p=2 to p=3 is very low. Therefore, the 2D MDS configuration is appropriate.MDS usingcijI for (a) classic compositions; (b) all musical compositions tested; (c) Shepard plot for 3D; (d) scree plot.
(a)
(b)
(c)
(d)In this line of thought, Figures5(a)–5(c) show the 2D locus for the Classic, Pop and Rock, and Reggae types of music, respectively. The Classic music compositions (Figure 5(a)) occupy a segment of approximately 80% of the curve obtained for all the musical compositions tested (Figure 5(d)). This segment begins near one end of the curve. The Pop and Rock music is located over a segment of approximately 80% of the curve beginning near the other end (Figure 5(b)). Therefore, approximately 60% of the positions for these two types of music are superimposed in the center of the curve. For the Pop and Rock most of the positions are concentrated in the half of the segment positioned at the opposite side of the classic music. The Reggae music compositions are located over a limited zone near the center of the curve (Figure 5(c)). Figure 5(d) shows the curve obtained for the 426 musical titles tested. The Jazz zone is centered approximately in the middle of the curve and corresponds to the superimposed zone of the Classic and the Pop and Rock. The Rhythm Blues titles are located approximately in the same zone of that corresponding to the Reggae. The Slow Rock and the Electro types occupy approximately the same segment that corresponds to the Classic music, nevertheless in a scattered way near the end of the curve. The Easy type occupies a shorter segment than the one occupied by the Slow Rock and the Electro. Finally, the Brazilian and the Portuguese compositions occupy a segment that corresponds approximately to the Reggae one, but with a slightly shift to the side of the Classic music. The shift is more pronounced for the case of the Portuguese music.2D locus generated by MDS usingcijI for: (a) Classic; (b) Pop-Rock; (c) Reggae; all musical compositions tested.
(a)
(b)
(c)
(d)Figure6 depicts the Shepard plot that confirms the good fitting of the 2D configuration distances to the dissimilarities.Figure 6
Shepard plot for 2D MDS usingcijI.Figure7 shows the locus of the musical compositions obtained by MDS using the metric cijfd. Figures 7(a)–7(c) show the locus for the Classic, Pop and Rock, and Reggae types of music, respectively. The Classic music compositions form a segment located in one end of the curve (Figure 7(a)). The Pop and Rock musical opus occupies the most part of the curve in a scattered way, but with a slightly superimposition over the Classic (Figure 7(b)). The Reggae music compositions are located on a limited zone superimposed over the Classic and the Pop and Rock compositions (Figure 7(c)).2D locus generated by MDS usingcijfd for (a) Classic; (b) Pop-Rock; (c) Reggae; (d) all musical compositions tested.
(a)
(b)
(c)
(d)Figure7(d) shows the locus of the 426 musical titles. In general the relative positions for the others types of music are similar to those obtained for cijI. Nevertheless the positions achieved with the metric cijfd are represented in a curve shorter than the one obtained with cijI that occasionally can make the analysis difficult.Figure8 shows the scree and Shepard plots to evaluate the results obtained by MDS using cijfd. Again, an “elbow” occurs at dimension two for a low value of stress (Figure 8(a)), which corresponds to a significant improvement in fit. Additionally, the Shepard plot (Figure 8(b)) shows the fitting of the 2D configuration distances to the dissimilarities.Evaluation of MDS results usingcijfd: scree plot (a); Shepard plot for 2D (b).
(a)
(b)The results obtained with the proposed tools, namely, the MDS and the PPP, together with the tested metrics proved to be assertive methods to analyze the musical compositions.


## 4. Conclusions

Through the history of music many authors tried to find mathematical formulae that could explain the process of music creation. In this perspective, the study analyzes the musical compositions from a mathematical view point. The representation in the time domain of the music compositions presents characteristics which makes difficult their direct comparison. To overcome this limitation the Shannon entropy was used together with other tools, namely, the pseudo phase plane and multidimensional scaling. These tools were applied to an aggregate of different type sets of music compositions. The proposed tools proved to be assertive methods to analyze music. In future work, we plan to pursue several research directions to help us understand the behavior of the musical signals. These include other techniques to measure the similarities of the signals.



---

*Source: 436108-2012-07-01.xml*