19
International Journal of Bifurcation and Chaos, Vol. 23, No. 11 (2013) 1350181 (19 pages) c World Scientific Publishing Company DOI: 10.1142/S0218127413501812 CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO EVOLUTIONARY COMPOSITION MAXIMOS A. KALIAKATSOS-PAPAKOSTAS Department of Mathematics, University of Patras, GR-26110 Patras, Greece [email protected] MICHAEL G. EPITROPAKIS Computing Science and Mathematics, School of Natural Sciences, University of Stirling, Stirling FK9 4LA, Scotland, UK [email protected] ANDREAS FLOROS Department of Audio and Visual Arts, Ionian University, GR-49100 Corfu, Greece [email protected] MICHAEL N. VRAHATIS Department of Mathematics, University of Patras, GR-26110 Patras, Greece [email protected] Received February 7, 2013; Revised July 16, 2013 Music is an amalgam of logic and emotion, order and dissonance, along with many combinations of contradicting notions which allude to deterministic chaos. Therefore, it comes as no surprise that several research works have examined the utilization of dynamical systems for symbolic music composition. The main motivation of the paper at hand is the analysis of the tonal com- position potentialities of several discrete dynamical systems, in comparison to genuine human compositions. Therefore, a set of human musical compositions is utilized to provide “composi- tional guidelines” to several dynamical systems, the parameters of which are properly adjusted through evolutionary computation. This procedure exposes the extent to which a system is capa- ble of composing tonal sequences that resemble human composition. In parallel, a time series analysis on the genuine compositions is performed, which firstly provides an overview of their dynamical characteristics and secondly, allows a comparative analysis with the dynamics of the artificial compositions. The results expose the tonal composition capabilities of the examined iterative maps, providing specific references to the tonal characteristics that they can capture. Keywords : Chaos and music; tonal time series; evolutionary composition. 1. Introduction Music composition is a process that encompasses a combination of two contradicting forces: the deter- minism imposed by music rules and the chaos that is subsumed in human creativity. Therefore, the utilization of chaotic system for automatic music composition seems like a direction worthy of exten- sive exploration. In fact, several research works have focused on the potential of using dynami- cal systems for music composition, however, the 1350181-1

CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

International Journal of Bifurcation and Chaos, Vol. 23, No. 11 (2013) 1350181 (19 pages)c© World Scientific Publishing CompanyDOI: 10.1142/S0218127413501812

CHAOS AND MUSIC: FROM TIME SERIESANALYSIS TO EVOLUTIONARY COMPOSITION

MAXIMOS A. KALIAKATSOS-PAPAKOSTASDepartment of Mathematics, University of Patras,

GR-26110 Patras, [email protected]

MICHAEL G. EPITROPAKISComputing Science and Mathematics,

School of Natural Sciences, University of Stirling,Stirling FK9 4LA, Scotland, UK

[email protected]

ANDREAS FLOROSDepartment of Audio and Visual Arts, Ionian University,

GR-49100 Corfu, [email protected]

MICHAEL N. VRAHATISDepartment of Mathematics, University of Patras,

GR-26110 Patras, [email protected]

Received February 7, 2013; Revised July 16, 2013

Music is an amalgam of logic and emotion, order and dissonance, along with many combinationsof contradicting notions which allude to deterministic chaos. Therefore, it comes as no surprisethat several research works have examined the utilization of dynamical systems for symbolicmusic composition. The main motivation of the paper at hand is the analysis of the tonal com-position potentialities of several discrete dynamical systems, in comparison to genuine humancompositions. Therefore, a set of human musical compositions is utilized to provide “composi-tional guidelines” to several dynamical systems, the parameters of which are properly adjustedthrough evolutionary computation. This procedure exposes the extent to which a system is capa-ble of composing tonal sequences that resemble human composition. In parallel, a time seriesanalysis on the genuine compositions is performed, which firstly provides an overview of theirdynamical characteristics and secondly, allows a comparative analysis with the dynamics of theartificial compositions. The results expose the tonal composition capabilities of the examinediterative maps, providing specific references to the tonal characteristics that they can capture.

Keywords : Chaos and music; tonal time series; evolutionary composition.

1. Introduction

Music composition is a process that encompasses acombination of two contradicting forces: the deter-minism imposed by music rules and the chaos thatis subsumed in human creativity. Therefore, the

utilization of chaotic system for automatic musiccomposition seems like a direction worthy of exten-sive exploration. In fact, several research workshave focused on the potential of using dynami-cal systems for music composition, however, the

1350181-1

Page 2: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

M. A. Kaliakatsos-Papakostas et al.

compositional potentiality of dynamical systemsremains relatively unexplored. Although manymethodologies have been proposed, the results thatmost works have presented do not provide com-parative analyses between the dynamical systems’compositions and the ones composed by humans.As a result, one may not come up with practicalimplications as to whether a human-like “chaoticcomposer” can be created. If so, what would itsdynamical and musical characteristics be? The aimsof this paper may be summarized as the examina-tion of symbolic music compositional capabilities ofseveral dynamical systems, focusing on the tonalaspects of music.

Nonlinear characteristics are deeply related tothe human perception of sound. Their existencein natural sound has been studied for a largevariety of phenomena, such as animal vocalization[Tokuda et al., 2002] and birdsong production mod-els [Amador & Mindlin, 2008]. Furthermore, therelation of nonlinear dynamics with human speechhas been investigated [Behrman, 1999], providingalso significant results in speech recognition [Jafariet al., 2010]. Additionally, theories that incorpo-rate nonlinearities in the mechanism through whichhumans perceive auditory events have providedgreat insights about sound and human perception[Chialvo, 2003]. Consequently, it comes without say-ing that the ultimate human cultural manifestationof sound — music — abounds in nonlinear struc-tures on many levels: from the level of instrumen-tal timbre [Fletcher, 1994] and overall orchestrationtimbres [Voss & Clarke, 1978], to the level of sym-bolic composition [Manaris et al., 2005].

Automatic music composition through dynam-ical systems has been a very popular techniquewhich inspired many researchers and artists, fromthe pioneering works of Pressing [1988], Bidlack[1992], Herman [1993] and Harley [1994], to morecontemporary works. An interesting approach foraltering the tonal characteristics of a piece was pro-posed in [Dabby, 1996], where the pitch space of thespecific piece was “convolved” with a chaotic solu-tion of a dynamical system. Thereafter, new neigh-boring solutions provided novel tonal sequencesthat gradually diverged from the ones of the ini-tial piece. The mainstream compositional strategyhowever, is the utilization of well-known dynami-cal systems like Chua’s circuit [Chua et al., 1993]for the generation of sound [Choi, 1994] or music

composition [Bilotta et al., 2007; Rizzuti et al.,2009]. The latter works not only examine the com-position of music with Chua’s circuit, but alsoevolve its parameters with genetic algorithms. Thefitness of the evolutionary process is provided by thepitch interval distribution of a target piece. Severaldynamical systems have been examined in [Cocaet al., 2010] and the produced music was charac-terized according to several music characteristics.A similar approach was followed in [Kaliakatsos-Papakostas et al., 2012b], but the musical outputin this case was examined in terms of its informa-tion complexity.

The paper at hand is motivated by the poten-tialities of dynamical systems for “symbolic” com-position of musical tonal sequences, reflected innumerous works that employ such systems forautomatic composition. Since the focus is on thetonal aspect of music, the automatic compositionmethodology that is followed disregards informa-tion on rhythm, intensities and timbre. To this end,two types of analysis are applied, which incorporatethe extraction of several tonal characteristics fromgenuine music masterpieces and the composition ofnovel tonal sequences using chaotic systems andevolution. On the one hand, the genuine composi-tions are examined in terms of their dynamical char-acteristics through a time series analysis approachwhich incorporates phase space reconstruction ofthe pieces’ attractors, the extraction of the largestLyapunov exponent and fractal dimension. A sim-ilar approach was presented in [Boon & Decroly,1995], but the present paper provides an exhaus-tive experimental research on a large set of com-positions, combined with a comparative analysison the time series characteristics between genuineand artificial compositions. On the other hand, sev-eral well-known dynamical systems are utilized tocompose novel tonal sequences, which are “trained”to share similar characteristics with the aforemen-tioned pieces. In the latter analysis, the param-eters of these dynamical systems are optimizedthrough evolutionary computation, so that the gen-erated novel pieces share similar characteristics tothe respective “target” genuine ones.

These tonal characteristics are exhibited tohighlight the exceptional characteristics of differentmusic styles and therefore constitute a qualitativemeasurement of the potentialities of each dynami-cal system concerning music composition. Through

1350181-2

Page 3: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

Chaos and Music: From Time Series Analysis to Evolutionary Composition

an extensive experimental study, the tonalsequences produced by some of the examined dis-crete dynamical systems are observed to encompasssome tonal characteristics that are present in gen-uine human compositions. However, through thephase space reconstruction that is realized withthe time series analysis of the genuine pieces, itis indicated that dynamical systems with highercomplexity and with a greater number of dimen-sions are required to compose human-like music.These results are assessed through a comparativescrutinization between the genuine and the artifi-cial compositions, not only on the level of musicalcharacteristics, but also on the level of their dynam-ical behavior expressed with the largest Lyapunovexponent and fractal dimension.

The rest of the paper is organized as follows.Section 2 discusses the extraction of tonal timeseries from genuine symbolic compositions in MIDIformat and presents the tools for the time seriesanalysis, which allows the phase space reconstruc-tion and the computation of the largest Lyapunovexponent and fractal dimension. The utilized auto-matic music composition methodology is reviewedin detail in Sec. 3. Specifically, the evolutionaryscheme that allows the tuning of the dynamicalsystems’ parameters is presented and the musicfeatures that constitute the basis for the fit-ness function are throughly analyzed. Section 3also discusses the automatic tonal compositionmethodology which encompasses coarse composi-tional guidelines to the dynamical systems. A thor-ough experimental report is given in Sec. 4, whichincorporates the most important findings that wereextracted by the application of the methodologiesdescribed in the preceding sections. The paper con-cludes in Sec. 5 with a synopsis along with conclud-ing remarks and some pointers to future work.

2. Dynamical Properties of theGenuine Compositions ThroughTime Series Analysis

As mentioned previously, this work is targetedtowards studying the tonal composition potential-ities of discrete dynamical systems, in the con-text of automatic music composition. Therefore,the output produced in consecutive iterations ofthese dynamical systems, is mapped to tonalsequences through a straightforward procedure that

is described below in detail. An initial approachto this subject is the study of tonal sequencesthat derive from “genuine” music masterpieces, interms of their dynamical characteristics. In orderto consider a wide spectrum of Western music, thisstudy incorporates several genuine compositionsfrom J. S. Bach, Mozart, Beethoven and a collectionof jazz standards composed by various artists. Forthe rest of the paper, the entire jazz collection willbe referred to as if it were composed by a single com-poser for simplicity. The fact that all jazz composi-tions are considered per composer is not expected toaffect the accuracy of results, because the jazz com-positional technique varies significantly from that ofclassical music. Therefore, their inclusion in a sin-gle category is intended to examine the differencesin dynamical properties among the compositionalstyles of the collected music sets. The extraction ofdynamical characteristics from the tonal sequencesthat derive from all the aforementioned composi-tions allows a first cartographical overview of theunderlying dynamics that are considered to pro-duce these compositions. Furthermore, this analysisallows a comparison in the dynamical characteris-tics of the genuine and the artificial compositions.

The composition process that is assumedthroughout the paper regards the symbolic level,i.e. only information that is interpretable in a scoreis considered, without any timbre-related informa-tion. Therefore, the aforementioned genuine com-positions are collected in MIDI format, which isa protocol that includes the most viable symbolicinformation of music content, allowing a quite accu-rate interpretation to music score. Additionally,in order to have comparable results among thetime series extracted from the genuine pieces, onlypiano executions were considered. Specifically, thedataset comprises piano sonatas from Beethovenand Mozart, the “Well Tempered Clavier” of Bachand piano transcriptions of several well-known jazzstandards. This fact “neutralizes” the effect ofinstrument-imposed constraints, like tonal rangeand polyphony, that may affect the format of thetonal sequences. To this end, the tonal sequence ofa piece is obtained by the serial concatenation ofall its tones in the order they appear, disregardinginter–onset distance and duration. In the case ofpolyphonic events, i.e. music events that incorpo-rate multiple simultaneous tones, the order of tonesis considered from the lowest to the highest tone

1350181-3

Page 4: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

M. A. Kaliakatsos-Papakostas et al.

of the polyphonic cluster. Although this approachmight be considered simplistic, it reflects the qual-itative demeanor of this study.1

2.1. Phase space reconstruction

Based on Takens’s [1981] theorem, if a time series,xii∈0,1,2,...,n, derives from a dynamical system, itencompasses all the viable characteristics needed toconstruct a topologically equivalent dynamical sys-tem. Thereby, the dynamical behavior of the initialsystem can be “reconstructed” in a topologicallyconsistent manner, even if the system’s dimension-ality is higher than the observed time series’. Thisprocedure is called “phase space reconstruction”and is realized by estimating the “novelty” intro-duced in segments of the time series (to computea proper time delay) and then computing thedimensionality of the dynamical system’s space.The phase space of the dynamical system is thenreconstructed by embedding replicates of the timeseries, shifted by a proper index expressed byan optimal time lag, in each dimension of thereproduced system. The resulting dynamical sys-tem is considered to produce the following vectorsequence, y(i) = (xi, xi+τ , xi+2τ , . . . , xi+(µ−1)τ ).A brief review of this methodology is discussedin the following paragraphs, while for a morethorough review the reader is referred to [Lai &Ye, 2003; Kodba et al., 2005]. In the paper athand, the software implementation presented in[Kugiumtzis & Tsimpiris, 2010] was utilized. Thesolicitation of further dynamical information isrealized through two more measures, namely theLargest Lyapunov Exponent (LLE) and the Frac-tal Dimension (FD) as described later. The lattertwo dynamical measures are not necessary for thephase space reconstruction, they are rather used asmeasures of comparison between the genuine andthe automatically produced compositions.

2.1.1. Embedding delay

The rationale behind determining a proper timedelay is the allocation of a time series segmen-tation to equal segments of length τ , where eachsegment incorporates information about the other.Such a segmentation exposes the interrelations that

the underlying dynamical system imposes to eachsegment of the time series. The time delay (or seg-ment length) value, τ , should be chosen so that thevariables xi, xi+τ , xi+2τ , . . . , xi+(q−1)τ , where q =l/τ and l is the length of the time series, are asindependent as possible. To this end, Fraser andSwinney [1986] proposed the examination of themutual information between all segments of thetime series, for various τ values. The computa-tion of mutual information is performed with theMATS [Kugiumtzis & Tsimpiris, 2010] toolbox inMATLAB, in which a partitioning is consideredthat produces a grid in the time series domaininterval [minxi,maxxi]i∈0,1,2,...,n, with k par-titions of length k/(maxxi−minxi)i∈0,1,2,...,n.Given the aforementioned domain partitioning, themutual information for a time delay τ is given by[Kodba et al., 2005]

I(τ) = − 1l − τ

k∑

n=1

k∑

m=1

Pn,m(τ) logPn,m(τ)(l − τ)

PnPm,

(1)

where l is the length of the time series, Pn and Pm

are the probabilities that a time series value is in thenth and mth grid position respectively and Pn,m(τ)is the joint probability that xi is in the nth gridposition and xi+τ is in the mth grid position. Thefirst minimizer of I(τ) constitutes the proper timedelay (segmentation length), to obtain the dynam-ical behavior as has hitherto been discussed.

2.1.2. Embedding dimension

The computation of the embedding dimensions, i.e.the number of dimensions in which the attractor ofthe assumed dynamical system lies, is vitally impor-tant for the phase space reconstruction. Thereby,the attractor of the underlying dynamical systemis assumed to fold and unfold smoothly whenthe embedding changes from an integer value tothe next one, without sudden irregularities in itsstructure. A popular method for estimating aproper embedding dimension for the dynamical sys-tem’s attractor, denoted by µ, is the false nearestneighbor [Kennel et al., 1992] method. With thismethod, the unfolding smoothness of the attrac-tor is examined in spaces with increasing dimension

1Several other considerations of polyphonic events were considered, like from lowest to highest tone, selecting only the highesttone, and random selection of tone order in polyphonic events, and the results were similar, and therefore omitted in thepresent study.

1350181-4

Page 5: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

Chaos and Music: From Time Series Analysis to Evolutionary Composition

(µ values). Thus, for each reconstructed point inthe examined embedding dimensions, µ, it is inves-tigated whether its nearest neighbor remains belowa distance threshold when the embedding dimensionis increased to µ+1. If this does not hold, then thesepoints are called false neighbors. The embeddingdimension that is chosen as appropriate, is the onethat incorporates a small percentage of false neigh-bors when the dimension is increased. In the contextof the presented work, the satisfactory percentageof false nearest neighbors was set to zero. Therefore,the proper embedding dimension was chosen to bethe smallest one that incorporates no false nearestneighbors.

2.2. Largest Lyapunov exponent

The sensitivity of a dynamical system to initial con-ditions is quantified by the Lyapunov exponents,which roughly discuss the expansion or contrac-tion rate of trajectories with initial conditions overa small µ-dimensional sphere. While the system’siterations progress, the sphere evolves into an ellip-soid the principal directions of which expand, con-tract or remain unchanged, as measured by positive,negative or zero Lyapunov exponents. In directionswhich incorporate negative Lyapunov exponents,the attractor’s projection is a fixed point, while zeroLyapunov exponents denote directions of limit cir-cles. Positive Lyapunov exponents signify the exis-tence of chaos. The set of Lyapunov exponents to alldirections is called the Lyapunov spectrum and it isdenoted by (λ1, λ2, . . . , λµ), but random initial con-dition vectors are expected to converge to the mostunstable manifold (with probability 1 [Rosensteinet al., 1993]). Therefore, the computation of thelargest Lyapunov exponent (LLE), λ1, is sufficientto indicate the existence of chaos in the examinedsystem.

Although there are numerical methods for com-puting the entire Lyapunov spectrum [Wolf et al.,1985] from time series, the acquisition of the largestexponent is needed to define the attractor’s chaoticpotentiality. A well-known methodology for evalu-ating the LLE of the reconstructed attractor froma time series, is due to Rosenstein [Rosensteinet al., 1993] and is the numerical method utilized inthe paper at hand. A prerequisite for Rosenstein’smethod is to reconstruct the attractor’s phase spacebased on the time series observation, thus obtainingthe time delay (τ) and embedding dimension (µ) asdescribed in Sec. 2.1. After the reconstruction, the

nearest neighbor (yı) of each point (yi) in the tra-jectory is located and their distance in this initialiteration is computed as

di(0) = minyı

‖yi − yı‖2. (2)

The LLE is then estimated as the mean rate of near-est neighbor separation throughout their successiveiterations. By definition, therefore, it holds that

di(t) = di(0)eλ1(t), (3)

where λ1(t) is the LLE estimation at time step t.Taking the logarithm of both sides in the equation,we have

ln(di(t)) = ln(di(0)) + λ1(t). (4)

The average LLE is finally approximated by the gra-dient of the linear regression among all neighboringpairs

b(t) = 〈ln(di(t))〉i, (5)

where 〈·〉i denotes the mean value over all possiblei indexes.

2.3. Fractal dimension

Fractal dimension (FD) is a concept that describesthe complexity of geometric objects as a ratio ofchange in detail to the change in scale [Mandel-brot, 1982]. Unlike the topological dimension, FDmay have noninteger values and a popular methodfor its computation is the well-known box count-ing method [Alevizos & Vrahatis, 2010]. Severalmethods have been proposed for the FD computa-tion of time series, among which are the correlationdimension method [Grassberger & Procaccia, 1983],the methods of Kantz [1988], Higuchi [1988], Pet-rosian [1995] and Sevcik [1998]. Many works havecompared the above methodologies either by theireffectiveness on experimental data (for example, forseizure detection in EEG), and/or on functions withtheoretically computable FD values (like the Weier-strass cosine functions [Tricot, 1994]) [Esteller et al.,2001; Goh et al., 2005; Raghavendra & Dutt, 2010;Ahmadi & Amirfattahi, 2010; Polychronaki et al.,2010]. The results yielded by these works provideuncertain and contradicting results about the suit-ability of each method for different tasks, reflectingthe fact that the computation of the FD of timeseries is case dependent.

The method used for the results presented inthis paper is the method of Sevcik [1998], since

1350181-5

Page 6: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

M. A. Kaliakatsos-Papakostas et al.

it is among most easily implementable and fastermethods. This method is based on the computa-tion of

DH = limε→0

−log(N(ε))log(ε)

, (6)

where N(ε) is the number of n-dimensional openballs with radius ε needed to completely cover theset under examination. If a length L is assumedfor the set that comprises the curve under exami-nation, then this curve can be covered by at leastN(ε) = L/(2ε) balls of radius ε. Sevcik pro-posed the consideration of the time series as a two-dimensional object, laying on the plane defined bytime (x-axis) and the time series’ values (y-axis).Therefore, the balls that are utilized for the exam-ination of the curve coverage, are considered astwo-dimensional balls. With these facts under con-sideration, the computation of DH may be writtenas [Raghavendra & Dutt, 2010]

DH = 1 − limε→0

log(L) − log 2log (ε)

. (7)

The method proposed by Sevcik utilizes the latterexpression of DH to derive the counterpart compu-tation for time series. Thereby, if a single dimen-sional time series is considered, a normalization ofboth the time series values (yi) and indexes (xi) isconsidered, with y∗i = (yi − ymin)/(ymax − ymin) andx∗

i = (xi − xmin)/(xmax − xmin) respectively, whereymin, ymax, xmin and xmax are the minimum andmaximum values and indexes respectively. By con-sidering a time series with N observations, an N×Ngrid is constructed on the normalized xy time seriesplane, and the fractal dimension is approximated as[Raghavendra & Dutt, 2010]

Ds = 1 +log(L) − log (2)log (2(N − 1))

, (8)

where L is the length of the normalized time series.

3. Automatic Composition of TonalSequences with SpecifiedCharacteristics

Automatic symbolic music composition encom-passes a great variety of methodologies that producenovel music content in the form of tones, onsets,note durations and timbre among others. The spe-cific subdomain that the paper at hand discussescould be characterized as “supervised” algorithmic

composition, in a sense that the compositional algo-rithm is “forged” to compose music which complieswith certain musical characteristics. Under this per-spective, the composition process is integrated witha supervised training process, in which the parame-ters of the automatic music generation algorithmare properly adjusted, to allow the compositionof music that is circumscribed within a musicalarea of predefined characteristics. In the context ofthe presented work, the algorithm that generatesnotes comprises an iterative map among the onesdemonstrated in Table 1 and a typical iteration-to-tones interpretation methodology that is describedin Sec. 3.3.

The tunable parameters of the automatic com-position algorithm are the parameters of the maps,within the ranges demonstrated in the third columnof Table 1. It has to be noticed that the initial con-ditions of a map is also considered as a parameterin the present work. Parameter values within theselected ranges, allow the respective maps to exposetheir dynamic potentialities, from fixed points andperiodic orbits to chaos. These parameters are prop-erly adjusted so that the generated tones complywith some musical criteria that are defined by aset of music features. The adjustment process isrealized with the Differential Evolution (DE) algo-rithm [Storn & Price, 1997; Price et al., 2005], whichevolves populations of parameter values towardsvalues that are better fitted to the problem athand, i.e. they allow the respective iterative sys-tems to compose music that complies with the tar-get music features. The target music features areextracted from each piece in the set of available gen-uine pieces. Under the guidance provided by a tar-get genuine piece in the form of music features, eachmap generates a new composition which is expectedto have similar features to the ones provided bythe target piece. The rhythmic and orchestrationpart of music are not considered and therefore,the notes produced by the dynamical systems are“attached” to the respective rhythmic values of thetarget pieces.

3.1. Evolving dynamical systemsto composers

The appropriateness of a map’s parameters, con-sidering the established evolutionary nomenclature,is called “fitness” and it is a value that describesthe “distance” between the features of the targetand the artificial composition. A proper distance

1350181-6

Page 7: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

Chaos and Music: From Time Series Analysis to Evolutionary Composition

Table 1. The iterative maps used as tone generators, their parameters and the parameters’ considered ranges.

Logistic xn+1 = 4rxn(1 − xn) r ∈ [0, 1], x0 ∈ [0, 1]

Tent xn+1 =

8>>>><>>>>:

2rxn, if xn ∈»0,

1

2

«

2r(1 − xn), if xn ∈»1

2, 1

– r ∈ [0, 1], x0 ∈ [0, 1]

Circle xn+1 =

„xn + Ω − K

2πsin(2πxn)

«mod 1 (Ω, K) ∈ [0, 10]2, x0 ∈ [0, 1]

Henon xn+1 = α − x2n + βyn

yn+1 = xn

α ∈ [0, 2], β ∈ [−1, 1],

(x0, y0) ∈ [−1, 1]2

Generalquadratic

xn+1 = α0 + α1xn + α2x2n + α3 + α4yn + α5y2

n

yn+1 = α6 + α7yn + α8y2n + α9 + α10xn + α11x2

n

(α0, α1, . . . , α11) ∈»−3

2,3

2

–12

,

(x0, y0) ∈ [−1, 1]2

Ikeda xn+1 = α + β(xn cos(θ) + yn sin(θ))

yn+1 = β(xn sin(θ) − yn cos(θ)),θ = c − d

x2n + y2

n + 1

α ∈ [0, 10], β ∈»1

2, 1

–, c ∈ [2, 5],

d ∈ [35, 50], (x0, y0) ∈ [−1, 1]2

measure should consider all features equally impor-tant, to drive the evolution of new dynamical sys-tem parameters towards ones that compose bettermusic, according to every feature impartially. Sincethe range of the features is not known a priori, orit could be any value in (−∞,∞), a straightfor-ward normalization of the feature values in [−1, 1]is not possible. To this end, the mean relative dis-tance, denoted dMRD measure could provide a goodimpartial approximation of the feature differences,since it offers an estimation about the percentage ofthe difference between the features of the genuineand the artificial pieces. Considering two vectors offeatures, fg and fa, their mean relative distance iscomputed as [Kaliakatsos-Papakostas et al., 2013]

dMRD =1k

k∑

i=1

|fg(i) − fa(i)|max(fg(i), fa(i)) , (9)

where k is the length of the feature vectors anddenotes the number of features, the index i refersto the ith vector element, or the ith feature andmax(a, b) returns the maximum among the num-bers a and b. A detailed description of the musicfeatures that comprise the music vector is providedin Sec. 3.2.

Each iterative map listed in Table 1 is employedas a music composer that generates tonal sequenceswith a methodology described in Sec. 3.3. Thecharacteristics of the music it composes rely on

its parameters’ values. Therefore, a method thatextensively searches for proper parameter values isrequired, in order to explore the map’s composi-tional potentialities comprehensively. As mentionedearlier, this method is the DE algorithm. With thismethod, a population of parameter values (calledindividuals) is randomly initialized, and the sys-tem is allowed to compose music with each oneof them. Afterwards, these parameters are alteredwith the application of some evolutionary operators,which create new individuals (i.e. sets of param-eter values). If the new individual produces “bet-ter music” than its ancestor, then it is selected tobelong to the new generation of individuals, else itsancestor passes on to the new generation. This pro-cedure continues iteratively, creating populationsof parameter values with better fitness, i.e. theyproduce better music. For the presented results, apopulation size of 50 individuals was utilized andevolved for 50 generations. The range of the param-eter values throughout all iterations, were forced toremain within the limits demarcated in the thirdcolumn of Table 1 respectively for each map.

3.2. Tonal features in short musicsegments

When considering automatic music compositiontowards the direction provided by some music

1350181-7

Page 8: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

M. A. Kaliakatsos-Papakostas et al.

Table 2. The considered tonal features.

Name Acronym Description

Tonal range range Difference between maximum and minimum pitch valuesTonal gradient grad Gradient of the interpolating line through pitch valuesTonal jumps mean pdM Mean value of consecutive pitch value differencesTonal jumps standard deviation pdS Standard deviation of pitch value differencesAscending profile asc Ratio of ascending intervals over the total number of intervalsDescending profile desc Ratio of descending intervals over the total number of intervalsConstant profile const Ratio of constant intervals over the total number of intervals

features, these features should encompass “fun-damental” music attributes, which describe asaccurately as possible the desired music output.Furthermore, features that describe musical charac-teristics accurately should yield clearer comparisonresults, allowing safer determination about whichmap exhibits better compositional capabilities. Thefeatures that have been selected for the reportedresults are shown in Table 2. Since the purview ofthis paper is the tonal musical domain (not rhythmor orchestration), the features are focused on tonalaspects, which concern statistics about the tran-sition of notes. These features do not incorporatestatistics about the tonal constitution of pieces,i.e. statistics that reflect the key of composition,since such features would not contribute to theassessment of the automatic composition system’sadaptability.

To obtain an insight about the musical descrip-tiveness of the seven aforementioned music fea-tures, a two-sided Wilcoxon [Wilcoxon, 1945] ranksum test is applied on the features extracted byshort segmentations of each piece for each com-poser. Through this test, the statistical significanceof the difference in each feature’s distribution foreach composer is examined. Specifically, for eachpair of composers we employ the rank sum test toeach respective feature pair, to obtain the proba-bility that these two features belong to continu-ous distributions with equal medians, a fact thatwould not make them descriptive. Formally, the null

Table 3. Statistical significance in the difference of eachfeature’s distributions among the pieces of each composer.

Bach Mozart Beethoven Jazz

Bach — 1101101 1111111 1111111Mozart — — 1101111 1111111Beethoven — — — 1111111

hypothesis for each feature pair is that they areindependent samples from identical continuous dis-tributions with equal medians. If the null hypothesisis rejected at the 5% significance level for a pair ofcomposers and a pair of features, then these featuresare indicated to encompass significant different sta-tistical information about each composer.

The results of this test are demonstrated inTable 3. Each cell in this table concerns the resultsabout each composer pair. The sequence of binarydigits within each cell denotes the rejection of thenull hypothesis with 1 and contrarily with 0, forthe respective feature. For example, for the Bach–Mozart pair, the null hypothesis is rejected to allbut the third and sixth features. Therefore, eachquadruple of 1 and 0 digits denotes the signifi-cance or not respectively, of distribution differencesbetween composer pairs for the respective feature.For example, the sequence 1101111 for the Mozart–Beethoven pair denotes that the distributions of allfeatures except the third are significantly different.Since Table 3 exhibits a statistical significance inthe distributions of most pairs of respective fea-tures for each composer, it is clearly indicated thatthese features encompass viable musical informa-tion. Therefore, within the extent of the presentedstatistical analysis, the results that are reported inSec. 4 could be trusted as indicative of the compo-sitional capabilities of each dynamical system.

3.3. Automatic tonal compositionmethodology

Since the main subject of examination is the tonalcompositional potentialities of iterative dynami-cal systems, the automatic composition processis directed solely towards tonal composition. Therhythmic elements are considered to be borrowedby the target piece, thus creating a compositionwith identical rhythm. The specific scope of the

1350181-8

Page 9: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

Chaos and Music: From Time Series Analysis to Evolutionary Composition

presented tonal composition methodology, assumesthe existence of a target genuine music piece whichprovides the tonal compositional guidelines for thegenerative system. It is important that these guide-lines encompass the necessary amount of informa-tion, which may be assumed by general admissions.For instance, although it is a tempting conjecture,one may hardly presume that a dynamical sys-tem would form musical structures that resemblehuman compositions in every hierarchical level, e.g.key structure, chord progressions or note motifs.The fact that musical knowledge is not inherent todynamical systems has been addressed by severalmeans, like the imposition of key constraints [Cocaet al., 2010; Kaliakatsos-Papakostas et al., 2012b](i.e. eligible notes on certain key) or tonal restric-tions imposed by a target piece itself [Dabby, 1996].

A tone generation approach similar to the onepresented here has been utilized for the gener-ation of tonal sequences, in the context of anautomatic intelligent music improviser [Kaliakatsos-Papakostas et al., 2012a]. The compositionalmethodology used in the current work is adjusted toreceive tonal guidelines from the target piece, whilethe above cited system receives guidelines from ahuman improviser. The target piece provides guide-lines that encompass music knowledge at an ele-mentary level, within short segments throughout itsduration. These guidelines incorporate tonal range,chord information and pitch class profile (PCP)complexity expressed by the Shannon informationentropy [Shannon, 2001] (SIE). These informationfeatures characterize a list of allowed notes, whichare eligible to be “played” by the dynamical systemthrough a straightforward mapping procedure. Anoverview of the system, as described in this para-graph, is illustrated in Fig. 1, while a detailed anal-ysis is provided in the next two paragraphs.

The target piece provides some intrinsic musicalguidelines to the dynamical system, which charac-terize the target piece’s music content in short timesegments, through the formulation of a note list foreach segment. The note list comprises notes withinthe range of each respective segment, which alsobelong to certain pitch class values. Initially, thetarget genuine piece is segmented in short intervals,according to its tempo, and the chord of each seg-ment is recognized with a typical template-basedtechnique [Oudre et al., 2010], considering severalchord templates with up to five voices. Since theavailable pieces are in MIDI format, a segmentation

Fig. 1. Flow diagram of the automatic composition process.

in certain measure subdivisions is possible. To thisend, a segment length of two beats was consideredthe most appropriate compromise between select-ing a too small, or a too large segmentation length.The main concern that the discussed methodologyfaces is the detection of chords within each seg-ment. Therefore, too small a segment may not pro-vide a sufficient amount of notes for successful chordrecognition. Contrarily, larger segments would mostlikely incorporate more than one chord, leading, inthe best case, to the disregard of all except onechord in the segment.

At first, the note list of each segment includesthe notes that pertain in the recognized chord, butadditional notes may be required to capture thetonal constitution of a segment. No matter whatsegmentation length would be chosen, it would stillbe possible to find a segment which incorporatesmore than one chord, or a segment with no chord(e.g. chromatic phrase). To this end, the supple-mentary information provided by the SIE of thePCP is also considered. In each segment, a value isobtained from the SIE of the PCP, which indicatesthe information complexity of tones in this segment.If this complexity is “reachable” by utilizing onlynotes of the recognized chord, then the notes thatcomprise the chord are sufficient and no additionalnotes are needed to form the final note list of thesegment. On the contrary, if the SIE threshold ofthe recognized chord is exceeded, the most promi-nent notes of the PCP are added incrementally tothe final note list, except from the ones that arealready added from the recognized chord, until the

1350181-9

Page 10: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

M. A. Kaliakatsos-Papakostas et al.

SIE threshold is covered. The final list of availablenotes comprises notes within the range dictated bythe respective segment and belong to the recognizedchord, with possible additional notes imposed bythe SIE complexity threshold. After the note listhas been constructed, the iterations of the dynami-cal system are normalized within [0, 1] and are thenlinearly mapped to the indexes of each segment’snote list. The tonal sequences that are produced,are adhered to the rhythmic note events of the gen-uine composition.

4. Results

The results focus on three inquiries. At first,the dynamical properties of the genuine composi-tions are assessed, providing information about theattractor characteristics of each composer’s tonalsequences. Secondly, results are reported on theadaptivity of each dynamical system to the tonalcharacteristics that are imposed by each composer.This analysis incorporates a thorough examinationof the musical characteristics that each system isable to reproduce. Finally, a comparative analysisis performed on the dynamical characteristics of thegenuine and the artificial compositions.

4.1. Time series analysis on thegenuine target compositions

This section presents the findings yielded by theapplication of the methods presented in Sec. 2.Specifically, the note sequence of each genuinepiece is considered to form a time series, by whichthe information of the attractor reconstruction areassessed, namely the time delay (τ) and embeddingdimension (µ), together with the Largest LyapunovExponent (LLE) and the Fractal Dimension (FD).This analysis is supplementary to the main perspec-tive of the paper, which is the examination of thecompositional capabilities of several dynamical sys-tems. Therefore, this analysis firstly aims to pro-vide some descriptive statistical information aboutthe attractor characteristics for different composersthrough the τ , µ, LLE and FD values assessed byevery piece. Secondly, the LLE and FD values offerthe opportunity to perform a comparative analysis,presented in Sec. 4.3, between the respective val-ues extracted from the pieces that were artificiallyproduced by the dynamical systems.

The attractor characteristics are shown in thebox plots in Fig. 2. Although the values presented

therein constitute numerical approximations, it isclearly observed that there are differences of thesecharacteristics between pairs of composers. Toexamine which time series characteristics are signif-icantly different between which pairs of composers,we perform a two-sided Wilcoxon [Wilcoxon, 1945]rank sum test, in a similar fashion as with the musicfeatures in Sec. 3.2. For the currently examinedcase, the null hypothesis is that the observationsderiving from a time series’ values from a composerpair, are samples from identical continuous distribu-tions with equal medians. The results for these testsare demonstrated in Table 4, while it is remindedthat the examined pieces are all piano compositionsor piano transcriptions (in the case of the jazz stan-dards). Therein, each four-tuple of digits denoteswhether the null hypothesis is rejected for the dis-tributions of the respective time series values, forthe respective composer of each row and column.Specifically, the digit 1 shows the rejection of thenull hypothesis on the significance level of 5% (thusthe results are statistically significant), while thedigit 0 the opposite. In specific, each quadruple of 1and 0 digits denotes the rejection or not respec-tively, of the null hypothesis for the distribution ofτ , µ, LLE and FD respectively between composerpairs. For example, the sequence 1101 for the Bach–Mozart pair denotes that the differences in τ , µ andFD distributions are statistically significant, whilethe LLE are not. The display order of each digitcorresponds to the distributions of τ , µ, LLE andFD values. It should be noted that for every pairof composers, there is at least one pair of distribu-tions that is significantly different, while the oppo-site holds for the LLE distributions.

4.2. Adaptivity of each dynamicalsystem

The inquiries discussed in this paragraph incorpo-rate the adaptivity of each dynamical system tothe specified composition tasks. The adaptivity ismeasured by the fitness value of the best individ-ual yielded by the evolutionary process as describedin Sec. 3.1. Table 5 presents the mean value andthe standard deviation of the fitness values pro-vided by the best individual in each compositiontask. It is reminded that each individual representsa set of parameter values (including initial iteration)for each map, as displayed in the third column ofTable 1, and that a composition task is the compo-sition of novel tonal content that encompasses the

1350181-10

Page 11: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

Chaos and Music: From Time Series Analysis to Evolutionary Composition

Bach Mozart Beethoven Jazz

20

30

40

50

60

70

80

90

100

composerBach Mozart Beethoven Jazz

4

6

8

10

12

14

16

18

20

composer

(a) (b)

Bach Mozart Beethoven Jazz

0

0.2

0.4

0.6

0.8

1

composer

Lyapunov

Bach Mozart Beethoven Jazz

1.52

1.54

1.56

1.58

1.6

1.62

1.64

1.66

1.68

1.7

composer

fractal dim.

(c) (d)

Fig. 2. Estimated (a) τ , (b) µ, (c) LLE and (d) FD values for the tonal time series of each piece in the dataset.

tonal characteristic of a target piece. From Table 5one may first notice that the worst performance forall composers is provided by the tent map, whilethe general quadratic map has produced individu-als with the best mean fitness, for the compositionsof all composers except from Beethoven. The bestmean performance for Beethoven was achieved bythe circle map. Nevertheless, the mean performanceof the general quadratic, the circle and the Henon

Table 4. Statistical significance of differences betweenτ , µ, LLE and FD distributions among the pieces of eachcomposer.

Bach Mozart Beethoven Jazz

Bach — 1101 1100 0101Mozart — — 0001 1101Beethoven — — — 1101

maps among all composers are comparable. A morethorough quantification of the significance of thissimilarity is performed below.

Figure 3 depicts the distribution of the train-ing errors among the examined music featureswith error bars, for the best and worst perform-ing dynamical systems. This figure signifies thatthe main differences of performance in these sys-tems lie on the first and the last three features,namely the range and percentages of ascending,descending and constant intervals. An additionalfact that should be noticed is the arithmetic valueof the mean fitness errors. For almost any mea-surement this value lies between 0.2 and 0.3, whileeven the best mean value is above 0.2. By consider-ing the fitness measurement method, the mean rel-ative distance (MRD) as defined in Sec. 3.1, onemay assume that the best artificial compositionsare expected to be 20% different than the original

1350181-11

Page 12: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

M. A. Kaliakatsos-Papakostas et al.

Table 5. Mean and standard deviation (in parentheses) of the best individual’s fitness values for all composersand maps. The best mean fitness value for each composer is demonstrated in boldface typesetting.

Logistic Tent Circle Henon Gen. Quad. Ikeda

Bach 0.237 (0.017) 0.268 (0.017) 0.213 (0.023) 0.217 (0.017) 0.212 (0.021) 0.229 (0.020)

Mozart 0.279 (0.021) 0.306 (0.015) 0.257 (0.022) 0.260 (0.024) 0.254 (0.024) 0.274 (0.023)

Beethoven 0.261 (0.021) 0.277 (0.020) 0.255 (0.016) 0.256 (0.018) 0.257 (0.022) 0.268 (0.018)

Jazz 0.276 (0.015) 0.295 (0.015) 0.264 (0.020) 0.263 (0.016) 0.258 (0.016) 0.271 (0.013)

ones, if such a lax quantitative conclusion may bereached. When consulting the findings in Fig. 3,however, it is indicated that there is a malappor-tionment of the errors among different features.Specifically, the grad feature, which is the gradientof the line that interpolates the notes in a segment,presents errors around 100%.

This big difference in the gradients may beexplained by consulting Fig. 4, which illustratesthe mean and standard deviation of the artificialpieces’ tonal features. The values of the gradientsare exhibited to be small in magnitude, a fact thatalso holds for the respective feature in the genuinecompositions. Therefore, an endogenous imbalanceof the MRD is exposed when considering small mag-nitudes. For example, if the target gradient in a seg-ment is 0.001 and the dynamical system generatesmusic that presents a gradient of 0.02 in the respec-tive segment, then the MRD value is 0.95, denot-ing 95% error. This measurement is in contradictionwith the intuitive approach that both gradients aresmall in magnitude. The errors in the rest of thefeatures remain in levels compared with the over-all fitness (around 0.2 or 20%), with an exceptionin the range feature where better performance wasreached for both the best and the worst performingmaps, although their difference is noticeable. Better

performance for this feature is expected, since therange is considered in the construction of the notelist, as discussed in Sec. 3.3. Therefore, accuratemeasurements for this feature could be assessed ifthe iterations of the dynamical systems approachedtheir entire range in every segment.

Figure 4 also demonstrates that the worstperforming map generates tones which efface thecharacteristic tonal marks of each composer, asimprinted in the collected features. Contrarily, thebest performing map preserves, at some extent, theuniqueness of features for each composer. There-fore, the implications of fitness difference are alsoindicated to entail a “homogenization” in the qual-itative and discriminative characteristics of the gen-erated music. This raises a question of which mapcaptures each music characteristic, expressed by theexamined features, more successfully. This inquiryis scrutinized in Table 6 with a comparative analy-sis between all pairs of maps, for each feature andfor every composer. Therein, the dynamical systemof each row is compared to the system of each col-umn according to their performance in each feature,for each composer. If the map of a row performssignificantly better than the map of a column fora specific feature and composer, then a “+” signappears in the respective row, column, composer

range grad pdM pdS asc desc const−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

feature

error

Bach gen. quadMozart gen. quadBeethoven gen. quadJazz gen. quadBach tentMozart tentBeethoven tentJazz tent

Fig. 3. The errors of each feature for the best (general quadratic) and the worst (tent) overall fitted maps.

1350181-12

Page 13: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

Chaos and Music: From Time Series Analysis to Evolutionary Composition

range grad pdM pdS asc desc const−0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

feature

norm. value

Bach

Mozart

Beethoven

Jazz

(a)

range grad pdM pdS asc desc const−0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

feature

norm. value

(b)

range grad pdM pdS asc desc const−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

feature

norm. value

(c)

Fig. 4. Error bars of normalized feature distributions for each composer, (a) for genuine composition, (b) for artificial onesproduced by the general quadratic map and (c) by the tent map.

and feature order. The results for each composerappear in each line in the respective cell (with theorder being (Bach, Mozart, Beethoven and Jazz)),while the features are presented from left to rightin the order appeared in Table 2. If the row mapis outperformed significantly, this is denoted with

a “−” sign, while a “=” sign denotes that there isno significant difference.

The significance in error differences is measuredwith the two-sided Wilcoxon rank sum test, as pre-viously, with the null hypothesis being that theerrors produced by a map for every composer and

1350181-13

Page 14: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

M. A. Kaliakatsos-Papakostas et al.

Table 6. Statistical significance of the compositional superiority of each map according to each feature and composer. Eachcell in the table incorporates the comparison of the maps in the respective row and column. A significant superiority ofthe row map per feature and composer is denoted by the “+” sign, the opposite with the “−” sign, while no significantdifference with the “=” symbol. Each row of symbols in a cell represents the pieces of each composer.

Logistic Tent Circle Henon Gen. Quad. Ikeda

Logistic — +− = + + ++ − = − + −− = − = + = −−− − = + −−−− − = + + −− =+ −− + + + + − = − + −− = − = + = −− = − = + −−− = − = + + −− =+ = − + + + + − = −+ = − = − === −− = − + + = −− = − + + = −− =+ −− = + + − −−− = −−− −− + −−−− − = −−−−− −− + −−−−

Tent — — − = −−−−− − + + −−−− − + + −−−− − + + −−−−− = + −−−− − + + −−−− − + + −−−− − + + −−−−− = + + −−− − = + = −−− − + + −−−− − = + −−−−− = + = −−− − + + −−−− − + + −−−− − + + −−−−

Circle — — — − + +− == − − + +− == − + + + ====− = + − + + − − = + −−−− + = + = ++ =− = +− == − − = +− == − + = + −−− =− + +− == − −+ = −−−− − = + −−−−

Henon — — — — + = − ==== + = ++ == ++ = −−−− = + = + + −− =+ = + == − = + = + = −− ++ = − = −− = + = + = − = +

Gen. Quad. — — — — — + = ++ == ++ = + + ++ =+ = + === ++ = + ====

each feature belong to identical continuous distri-butions with equal medians. The rejection of thenull hypothesis in the 5% significance level for eachrespective pair of error distributions is denoted witha “+” or “−” and the contrary with the “=” sym-bol. The findings in Table 2 demonstrate that thereis an overall feature superiority for the better per-forming maps, with some exceptions mainly encoun-tered for the second and third features (the tonalrange and mean value of consecutive pitch differ-ences). This fact probably signifies that the dynam-ical systems with the “weakest” compositional skillswere the ones that could not produce descending,ascending and constant patterns that resembled thegenuine compositions. Therefore, the evolutionaryprocess endued these maps with the comparativeadvantage to compose music with more accurateoverall tonal gradient and between-pitch distances.

4.3. Dynamical properties of thegenuine and the artificialcompositions

As mentioned in Sec. 2, a comparison of the dynam-ical properties of the artificial compositions is also

examined. The dynamical characteristics incorpo-rate the LLE and the FD. The phase space recon-struction is not necessary since its properties arealready known through the analytic form of thedynamical systems. Furthermore, since the dynam-ical systems are known, different approaches couldbe followed for the computation of the LLE and FD(probably including analytic computation wherepermitted). Nonetheless, since a comparative analy-sis is pursued, the same numerical approaches wereconsidered as for the genuine compositions. There-fore, the tonal parts of the artificial compositionswere considered themselves as time series, with theirattractor characteristics (time delay and embed-ding dimension) being provided by the respectivedynamical system that produced them. Throughthese time series, the LLE and FD were extractedand the results, together with the fitness values, areillustrated with box plots in Fig. 5. These results aregrouped in two manners, according to composer andmap.

The finding in Figs. 5(c) and 5(e) demonstratethe distributions of the LLE and FD for all the arti-ficial compositions of all maps. In comparison to therespective distributions in Figs. 2(c) and 2(d), the

1350181-14

Page 15: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

Chaos and Music: From Time Series Analysis to Evolutionary Composition

Bach Mozart Beethoven Jazz

0.16

0.18

0.2

0.22

0.24

0.26

0.28

0.3

0.32

0.34

composer

fitness

logistic tent circle Henon quad. Ikeda

0.16

0.18

0.2

0.22

0.24

0.26

0.28

0.3

0.32

0.34

map

fitness

(a) (b)

Bach Mozart Beethoven Jazz

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

composer

Lyapunov

logistic tent circle Henon quad. Ikeda

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

map

Lyapunov

(c) (d)

Bach Mozart Beethoven Jazz1.64

1.66

1.68

1.7

1.72

1.74

1.76

composer

fractal dim.

logistic tent circle Henon quad. Ikeda1.64

1.66

1.68

1.7

1.72

1.74

1.76

map

fractal dim.

(e) (f)

Fig. 5. Fitness, LLE and FD per composer and per map for the artificial compositions. (a) Fitness per composer, (b) fitnessper map, (c) Lyapunov per composer, (d) Lyapunov per map, (e) FD per composer and (f) FD per map.

1350181-15

Page 16: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

M. A. Kaliakatsos-Papakostas et al.

Table 7. Mean and standard deviation (in parentheses) of the best individual’s largest Lyapunov exponent values forall composers and maps. The values that correspond to best mean fitness value in Table 5 are demonstrated in boldfacetypesetting.

Genuine Logistic Tent Circle Henon Gen. Quad. Ikeda

Bach 0.043 (0.105) 0.373 (0.211) 0.627 (0.016) 0.374 (0.457) 0.076 (0.096) 0.070 (0.107) 0.287 (0.169)

Mozart 0.021 (0.031) 0.305 (0.189) 0.629 (0.021) 0.370 (0.496) 0.082 (0.105) 0.029 (0.060) 0.327 (0.197)

Beethoven 0.053 (0.163) 0.345 (0.214) 0.626 (0.015) 0.250 (0.296) 0.089 (0.147) 0.074 (0.109) 0.269 (0.231)

Jazz 0.146 (0.302) 0.311 (0.191) 0.624 (0.019) 0.533 (0.537) 0.057 (0.091) 0.022 (0.031) 0.364 (0.202)

Table 8. Mean and standard deviation (in parentheses) of the best individual’s fractal dimension values for all composersand maps. The values that correspond to best mean fitness value in Table 5 are demonstrated in boldface typesetting.

Genuine Logistic Tent Circle Henon Gen. Quad. Ikeda

Bach 1.637 (0.027) 1.721 (0.013) 1.685 (0.004) 1.701 (0.021) 1.730 (0.017) 1.714 (0.022) 1.732 (0.008)

Mozart 1.657 (0.024) 1.721 (0.015) 1.684 (0.005) 1.692 (0.024) 1.724 (0.019) 1.706 (0.019) 1.730 (0.013)

Beethoven 1.633 (0.041) 1.724 (0.016) 1.685 (0.004) 1.683 (0.024) 1.712 (0.020) 1.709 (0.023) 1.722 (0.023)

Jazz 1.583 (0.031) 1.723 (0.015) 1.685 (0.005) 1.698 (0.021) 1.719 (0.018) 1.699 (0.019) 1.724 (0.024)

LLE and FD distributions for the artificial piece donot differentiate for different composers. Consultingthe distributions of compositions for all composersper map, in Figs. 5(d) and 5(f), one may noticethat the LLE and FD distributions for the artifi-cial pieces are vastly different for each map. Addi-tionally, the fitness distributions per map, as shownin Fig. 5(b), seem to follow the behavior of theLLE distributions per map illustrated in Fig. 5(d).This observation is evaluated by the strong corre-lation (0.83) of the fitness and LLE values of thebest individuals. This fact indicates that better fit-ness is expected to emerge from maps with positiveLLE value closer to zero. Therefore, someone couldarguably notice that there might be a threshold of“musical chaos” above but near zero LLE values.Such an argument however, needs more extensivescrutinization.

The mean values and standard deviations of theLLE and FD distributions for genuine and artificialcompositions for each composer and map are shownin Tables 7 and 8 respectively. The LLEs of the gen-uine piece are exhibited to be closer to zero than anyother LLE value of the artificial pieces in Table 7.The LLEs that correspond to the best mean fit-ness, as demonstrated in Table 5, are the smallestamong all other artificial pieces, except from thepiece of Beethoven. Similarly, the FD values of thegenuine pieces is considerably lower than the FDsof the artificially composed pieces. In this case, theartificial pieces with the best fitness per composer

are not the ones with the smallest FD value. It istherefore indicated, that there is no immediate con-nection between the FD value, at least as expressedby the computation of the time series algorithm,and the compositional capabilities of the dynamicalsystems.

5. Synopsis and ConcludingRemarks

In this paper we presented a thorough study on thetonal composition potentiality of several discretedynamical systems. Several genuine music master-pieces composed by J. S. Bach, Mozart, Beethovenand various jazz musicians, were utilized as musicreference, providing compositional “guidelines” tothe dynamical systems. Through an evolutionaryapproach, the parameters of the discussed systemswere optimized so that the tonal sequences thateach system composes, resemble the ones of the gen-uine pieces, according to some tonal features whichencompass essential musical information. Firstly, atime series analysis was performed on the tonalsequences provided by the genuine composition thatallowed an approximate phase space reconstruc-tion of their attractor. Consequently, their LargestLyapunov Exponent (LLE) and Fractal Dimen-sion (FD) could be assessed, allowing a compar-ative analysis of their dynamical characteristicsand the respective characteristics of the artificialpieces. The resulting artificial compositions were

1350181-16

Page 17: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

Chaos and Music: From Time Series Analysis to Evolutionary Composition

scrutinized in several aspects, which incorporatedtheir tonal capabilities and dynamical characteris-tics for each composer and according to each tonalfeature. Thereby, a thorough survey on the tonalcompositional capabilities of each map was allowed,together with several comparative studies that pro-vide insights about the qualitative music character-istics that may be pursued by utilizing dynamicalsystems as automatic music composers.

Through the time series analysis performed onthe genuine musical masterpieces, an interestingfinding is that the attractor characteristics of eachcomposer differ significantly. The dynamical char-acteristics of these attractors however, could notbe accurately reproduced by the examined dynam-ical systems. This is probably due to the fact thatthe examined dynamical systems are quite “simple”in terms of their dimensionality and time delay, asdemonstrated by the respective phase space recon-struction values. However, some important insightswere provided about the connection of qualita-tive music features and dynamical characteristicsthrough the LLE value. Specifically, it was indi-cated that dynamical systems with smaller posi-tive LLEs produced compositions which were moresimilar to the genuine pieces. Additionally, it maybe assumed that iterative maps which performedbetter were the ones that could reproduce tonalmotif-like structure, which is expressed through thefeatures that incorporated percentages of ascend-ing, descending or constant pitch intervals withinshort segments of music. Contrarily, the worst per-forming maps, were better at capturing less refinedmusical features, like absolute pitch differences andpitch-change gradient.

The fact that the reconstructed phase spaceof the original compositions incorporated a greatnumber of dimensions, indicates that the appro-priate dynamical systems should probably alsoincorporate more dimensions. Thereby, the task athand could be approached by a similar evolution-ary strategy, with iterative dynamical systems ofhigher dimensionality. The equations that consti-tute these systems however could incorporate alarge number of parameters. For example, the gen-eral quadratic map, which constitutes a generalform of a two-dimensional quadratic system incor-porates 12 parameters, considering also the initialiterations. The n-dimensional version of the generalquadratic map, for example, incorporates 2n + 2n2

parameters and therefore their number becomes

overwhelming even for a relatively small number ofdimensions.

Future work could also include a similar timeseries analysis on pieces with more simple tonalstructure, like dances or even contemporary pop-ular songs. Thereby, the connections between theperceived tonal complexity and the dynamical char-acteristics, e.g. the fractal dimension, could bedirectly examined. Finally, future work should alsoincorporate the examination of the compositionalcapabilities of several dynamical systems under“special” parameter value combinations, which pro-voke “special” dynamical behavior. For instance,the compositional characteristics of the logisticfunction could be examined when its parameter isset at the Feigenbaum point, provoking “weaklychaotic” dynamics, through a similar comparisonwith genuine human compositions.

Acknowledgments

We gratefully acknowledge many stimulating anduseful discussions with Professor Tassos C. Bountis.This research has been partially co-financed bythe European Union [European Social Fund (ESF)]and Greek national funds through the Opera-tional Program “Education and Lifelong Learn-ing” of the National Strategic Reference Framework(NSRF) — Research Funding Program: Thales.Investing in knowledge society through the Euro-pean Social Fund.

References

Ahmadi, B. & Amirfattahi, R. [2010] “Comparisonof correlation dimension and fractal dimension inestimating BIS index,” Wireless Sensor Network 2,67–73.

Alevizos, P. D. & Vrahatis, M. N. [2010] “Optimaldynamic box-counting algorithms,” Int. J. Bifurca-tion and Chaos 20, 4067–4077.

Amador, A. & Mindlin, G. B. [2008] “Beyond harmonicsounds in a simple model for birdsong production,”Chaos 18, 043123-1–6.

Behrman, A. [1999] “Global and local dimensions ofvocal dynamics,” J. Acoust. Soc. America 105, 432–443.

Bidlack, R. [1992] “Chaotic systems as simple (but com-plex) compositional algorithms,” Comput. Music J.16, 33–47.

Bilotta, E., Pantano, P., Cupellini, E. & Rizzuti, C.[2007] “Evolutionary methods for melodic sequences

1350181-17

Page 18: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

M. A. Kaliakatsos-Papakostas et al.

generation from non-linear dynamic systems,” Appli-cations of Evolutionary Computing, Lecture Notes inComputer Science, Vol. 4448 (Springer, Berlin, Hei-delberg), pp. 585–592.

Boon, J. P. & Decroly, O. [1995] “Dynamical systemstheory for music dynamics,” Chaos 5, 501–508.

Chialvo, D. R. [2003] “How we hear what is not there:A neural mechanism for the missing fundamental illu-sion,” Chaos 13, 1226–1230.

Choi, I. [1994] “Interactive exploration of a chaotic oscil-lator for generating musical signals in real-time con-cert performance,” J. Franklin Instit. 331, 785–818.

Chua, L., Wu, C., Huang, A. & Zhong, G.-Q. [1993] “Auniversal circuit for studying and generating chaos. i.Routes to chaos,” IEEE Trans. Circuits Syst.-I : Fund.Th. Appl. 40, 732–744.

Coca, A. E., Tost, G. O. & Zhao, L. [2010] “Character-izing chaotic melodies in automatic music composi-tion,” Chaos 20, 033125-1–12.

Dabby, D. S. [1996] “Musical variations from a chaoticmapping,” Chaos 6, 95–107.

Esteller, R., Vachtsevanos, G., Echauz, J. & Litt, B.[2001] “A comparison of waveform fractal dimensionalgorithms,” IEEE Trans. Circuits Syst.-I : Fund. Th.Appl. 48, 177–183.

Fletcher, N. H. [1994] “Nonlinear dynamics and chaos inmusical instruments,” Compl. Int. 1, 106–117.

Fraser, A. & Swinney, H. [1986] “Independent coordi-nates for strange attractors from mutual informa-tion,” Phys. Rev. A 33, 1134–1140.

Goh, C., Hamadicharef, B., Henderson, G. T. & Ifeachor,E. C. [2005] “Comparison of fractal dimension algo-rithms for the computation of EEG biomarkers fordementia,” Proc. 2nd Int. Conf. Computational Intel-ligence in Medicine and Healthcare (CIMED2005)(Lisbon, Portugal), pp. 464–471.

Grassberger, P. & Procaccia, I. [1983] “Measuring thestrangeness of strange attractors,” Physica D 9, 189–208.

Harley, J. [1994] “Algorithms adapted from chaos the-ory: Compositional considerations,” Proc. 1993 Int.Computer Music Conf. (ICMA 1994) (San Francisco,USA), pp. 209–212.

Herman, M. [1993] “Deterministic chaos, iterative mod-els, dynamical systems and their application in algo-rithmic composition,” Proc. 1993 Int. ComputerMusic Conf. (ICMA 1993) (San Francisco, USA),pp. 194–197.

Higuchi, T. [1988] “Approach to an irregular time serieson the basis of the fractal theory,” Physica D 31, 277–283.

Jafari, A., Almasganj, F. & Bidhendi, M. N. [2010]“Statistical modeling of speech Poincare sections incombination of frequency analysis to improve speechrecognition performance,” Chaos 20, 033106-1–11.

Kaliakatsos-Papakostas, M. A., Floros, A. & Vrahatis,M. N. [2012a] “Intelligent real-time music accompa-niment for constraint-free improvisation,” Proc. 24thIEEE Int. Conf. Tools with Artificial Intelligence(ICTAI 2012) (Piraeus, Athens, Greece), pp. 444–451.

Kaliakatsos-Papakostas, M. A., Floros, A. & Vrahatis,M. N. [2012b] “Music synthesis based on nonlineardynamics,” Proc. Bridges 2012, Mathematics, Music,Art, Architecture, Culture (Baltimore, USA), pp. 467–470.

Kaliakatsos-Papakostas, M. A., Floros, A. & Vrahatis,M. N. [2013] “Evodrummer: Deriving rhythmic pat-terns through interactive genetic algorithms,” Evo-lutionary and Biologically Inspired Music, Sound,Art and Design (Springer, Berlin, Heidelberg),pp. 25–36.

Kantz, M. J. [1988] “Fractals and the analysis of wave-forms,” Comput. Biol. Med. 18, 145–156.

Kennel, M. B., Brown, R. & Abarbanel, H. D. I.[1992] “Determining embedding dimension for phase-space reconstruction using a geometrical construc-tion,” Phys. Rev. A 45, 3403–3411.

Kodba, S., Perc, M. & Marhl, M. [2005] “Detecting chaosfrom a time series,” Eur. J. Phys. 26, 205–215.

Kugiumtzis, D. & Tsimpiris, A. [2010] “Measures of anal-ysis of time series (mats): A matlab toolkit for compu-tation of multiple measures on time series data bases,”J. Statist. Softw. 33, 1–30.

Lai, Y.-C. & Ye, N. [2003] “Recent developments inchaotic time series analysis,” Int. J. Bifurcation andChaos 13, 1383–1422.

Manaris, B., Romero, J., Machado, P., Krehbiel, D.,Hirzel, T., Pharr, W. & Davis, R. B. [2005] “Zipf’slaw, music classification, and aesthetics,” ComputerMusic J. 29, 55–69.

Mandelbrot, B. B. [1982] The Fractal Geometry ofNature (W. H. Freeman and Company).

Oudre, L., Fevotte, C. & Grenier, Y. [2010] “Probabilis-tic framework for template-based chord recognition,”2010 IEEE Int. Workshop on Multimedia Signal Pro-cessing (MMSP), (Saint-Malo, France), pp. 183–187.

Petrosian, A. [1995] “Kolmogorov complexity of finitesequences and recognition of different preictal EEGpatterns,” Proc. Eighth Ann. IEEE Symp. Computer-Based Medical Systems, CBMS ’95 (IEEE ComputerSociety, Washington, DC, USA), pp. 212–217.

Polychronaki, G. E., Ktonas, P. Y., Gatzonis, S., Sia-touni, A., Asvestas, P. A., Tsekou, H., Sakas, D. &Nikita, K. S. [2010] “Comparison of fractal dimen-sion estimation algorithms for epileptic seizure onsetdetection,” J. Neural Engin. 7, 046007.

Pressing, J. [1988] “Nonlinear maps as generators ofmusical design,” Comput. Music J. 12, 35–46.

Price, K., Storn, R. M. & Lampinen, J. A. [2005] Dif-ferential Evolution: A Practical Approach to Global

1350181-18

Page 19: CHAOS AND MUSIC: FROM TIME SERIES ANALYSIS TO …vrahatis/papers/journals/Kaliakatsos... · Chaos and Music: From Time Series Analysis to Evolutionary Composition an extensive experimental

December 4, 2013 10:15 WSPC/S0218-1274 1350181

Chaos and Music: From Time Series Analysis to Evolutionary Composition

Optimization (Natural Computing Series) (Springer-Verlag, NY, Inc., Secaucus, NJ, USA).

Raghavendra, B. S. & Dutt, N. D. [2010] “Computingfractal dimension of signals using multiresolutionbox-counting method,” Int. J. Inform. Math. Sci. 1,50–65.

Rizzuti, C., Bilotta, E. & Pantano, P. [2009] “AGA-based control strategy to create music with achaotic system,” Applications of Evolutionary Com-puting, Lecture Notes in Computer Science, Vol. 5484(Springer, Berlin, Heidelberg), pp. 585–590.

Rosenstein, M. T., Collins, J. J. & De Luca, C. J. [1993]“A practical method for calculating largest Lyapunovexponents from small data sets,” Physica D 65, 117–134.

Sevcik, C. [1998] “A procedure to estimate the fractaldimension of waveforms,” Compl. Int. 5. Availablefrom http://www.complexity.org.au/ci/vol05/sevcik/sevcik.html.

Shannon, C. E. [2001] “A mathematical theory of com-munication,” ACM SIGMOBILE Mobile Computingand Commun. Rev. 5, 3–55.

Storn, R. & Price, K. [1997] “Differential evolution — Asimple and efficient adaptive scheme for global opti-mization over continuous spaces,” J. Global Optim.11, 341–359.

Takens, F. [1981] “Detecting strange attractors in turbu-lence,” Dynamical Systems and Turbulence, Warwick1980 (Springer, Berlin, Heidelberg), pp. 366–381.

Tokuda, I., Riede, T., Neubauer, J., Owren, M. J. &Herzel, H. [2002] “Nonlinear analysis of irregular ani-mal vocalizations,” J. Acoust. Soc. America 111,2908–2919.

Tricot, C. [1994] Curves and Fractal Dimension(Springer).

Voss, R. F. & Clarke, J. [1978] “1/f noise in music: Musicfrom 1/f noise,” J. Acoust. Soc. America 63, 258–263.

Wilcoxon, F. [1945] “Individual comparisons by rankingmethods,” Biometr. Bull. 1, 80–83.

Wolf, A., Swift, J. B., Swinney, H. L. & Vastano, J. A.[1985] “Determining Lyapunov exponents from a timeseries,” Physica D 16, 285–317.

1350181-19