Top Banner
November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4 International Journal on Artificial Intelligence Tools c World Scientific Publishing Company AUTOMATIC INTERACTIVE MUSIC IMPROVISATION BASED ON DATA MINING * CONSTANTINOS HALKIOPOULOS Department of Mathematics, University of Patras Artificial Intelligence Research Center, University of Patras 26500 Rio, Patras, Greece [email protected] BASILIS BOUTSINAS Dept. of Business Administration, Management Information Systems & Business Intelligence Lab, University of Patras Artificial Intelligence Research Center, University of Patras 26500 Rio, Patras, Greece [email protected] Received (Day Month Year) Revised (Day Month Year) Accepted (Day Month Year) An area of focus in music improvisation is interactive improvisation between a human and a computer system in real time. In this paper, we present a musical interactive system acting as a melody continuator. For each musical pattern given by the user, a new one is returned by the system which is built by using general patterns for both pitch and duration stored in its knowledge base. The latter consists of data mining rules extracted from different sets of melodies for different musical styles. The proposed system uses a new music representation scheme which treats separately pitch and duration. Also, it adopts a similarity measure initially developed for clustering categorical data. Moreover, we present experimental results, using Bach’s Chorales and Jazz as test inputs, for both assessing the aesthetic quality of the proposed system and comparing it to human results. performance Keywords : Musical pattern matching; computer-assisted music analysis; Music represen- tation. 1. Introduction Computer music systems based on AI are of three major types: compositional, im- provisational and performance. 33 Compositional systems aim at automatic music * This research project (PENED) is co-financed by E.U.-European Social Fund and the Greek Ministry of Development-GSRT. 1
23

Automatic Interactive Music Improvisation Based on Data Mining

Jan 22, 2016

Download

Documents

Roberto Rivas

Music generation from data, Improvisation, Data mining
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

International Journal on Artificial Intelligence Toolsc© World Scientific Publishing Company

AUTOMATIC INTERACTIVE MUSIC IMPROVISATION BASEDON DATA MINING∗

CONSTANTINOS HALKIOPOULOS

Department of Mathematics,University of Patras Artificial Intelligence Research Center,

University of Patras26500 Rio, Patras, Greece

[email protected]

BASILIS BOUTSINAS

Dept. of Business Administration,Management Information Systems & Business Intelligence Lab,

University of Patras Artificial Intelligence Research Center,University of Patras

26500 Rio, Patras, [email protected]

Received (Day Month Year)Revised (Day Month Year)Accepted (Day Month Year)

An area of focus in music improvisation is interactive improvisation between a humanand a computer system in real time. In this paper, we present a musical interactive systemacting as a melody continuator. For each musical pattern given by the user, a new oneis returned by the system which is built by using general patterns for both pitch andduration stored in its knowledge base. The latter consists of data mining rules extractedfrom different sets of melodies for different musical styles. The proposed system uses anew music representation scheme which treats separately pitch and duration. Also, itadopts a similarity measure initially developed for clustering categorical data. Moreover,we present experimental results, using Bach’s Chorales and Jazz as test inputs, for bothassessing the aesthetic quality of the proposed system and comparing it to human results.

performance

Keywords: Musical pattern matching; computer-assisted music analysis; Music represen-tation.

1. Introduction

Computer music systems based on AI are of three major types: compositional, im-provisational and performance.33 Compositional systems aim at automatic music

∗This research project (PENED) is co-financed by E.U.-European Social Fund and the GreekMinistry of Development-GSRT.

1

Page 2: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

2 C. Halkiopoulos, B. Boutsinas

generation based on an algorithmic paradigm. Since the Illiac Suite, a string quar-tet composed by a generate-and-test approach,17 a great number of such systemshave been proposed in the literature (see Mantaras and Arcos,33 Papadopoulos andWiggins39 for a review). Improvisational systems aim at automatic generation ofvariations over certain music input provided by the user. Several of such systemsoperate in real-time. Similarly to compositional systems, a lot of effort has beendevoted to improvisational ones since the early work of Flavors Band (see Mantarasand Arcos,33 Rowe43 for a review). Finally, there is an increasing interest in perfor-mance systems, which aim at automatic generation of expressive performance of apiece of music (see see Mantaras and Arcos33 for a review). A performance systemtries to model the expressiveness, i.e. knowledge applied when performing a score,by means of rules incorporating certain musical parameters, i.e. loudness, vibrato,rubato and articulation.

An area of focus in improvisational systems is interactive improvisation betweena human and a system in real time.40 In general, the term “musical interactive sys-tem” encompasses all systems which depend on the users actions to generate soundand also includes systems which interact musically with the user (see Robertsonand Plumbley40 for an overview). Such systems include, apart from automatic im-provising, automatic accompaniment11 and continuations of musicians input.38

Several of the interactive improvisational systems proposed in the literatureare designed for jazz improvisation.4,24 They are often based on predictive theorieswhich are often related to stochastic models that estimate the probability for musicalelements to appear in a given musical context. Several of such models are Markovchains, but there are more, such as dictionary-based prediction.2 A lot of earliersystems are based on explicitly coding music rules in some logic or formal grammar.9

A system to be able to accomplish interactive improvisation has to solve severalproblems dynamically, during actual performance, such as note and rhythm selectionthat are of interest to the listener, after reacting to inputs from the human.24

In this paper, we present a musical interactive system (POLYHYMNIA) act-ing as melody continuator in real time. In the proposed system, note and rhythmselection is reduced to two very important issues in computer music: music repre-sentation and musical pattern similarity. We present new approaches for these issuesbased on data mining.

The key idea of the proposed approach is based on the fact that musical percep-tion is guided by expectations connected to the recent past context. More specifi-cally, it is based on perception of the relations between successive notes of a musicalpattern: it seems that when we hear a new note, the last one that has just beenheard remains active in our mind and buffered in a so called short term memory.27

The limited extension of short term memory should be defined both in terms oftime (no more than 15 sec., for instance) and size (no more than 7 elements, forinstance).27

For each musical pattern in the short term memory, (given by the human), theproposed system recalls similar general patterns for both pitch and duration stored

Page 3: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

Automatic interactive music improvisation based on data mining 3

in its memory in the form of data mining rules. Similarity is expressed along bothpitch and rhythm.

In this paper, association rule mining1 is applied in order to extract impor-tant features of different musical styles hidden in the patterns of both pitch andrhythm. Pitch and rhythm patterns are formed by segmenting musical fragments ofa certain number of bars into subfragments that have the same melodic direction.The extracted association rules are stored as general patterns in the general pat-tern knowledge base. Then, during improvisation, any recalled general patterns israndomly modified forming the output of the proposed system.

In the rest of the paper we first present the proposed music representation scheme(Section 2) and the adopted musical pattern similarity measure (Section 3). Then,we present the architecture of the proposed system (Section 4). Finally, we presentexperimental results (Section 5) and we conclude (Section 6).

2. The proposed music representation scheme

The proposed system exploits the benefits of data mining techniques to extracthidden patterns for different musical styles. However, a proper music representationscheme is a prerequisite for the application of such techniques.

In the following subsections, after discussing data mining in the context of musicrepresentation, we propose a scheme for monophonic music representation. Usingthe proposed scheme, the representation of musical patterns can be directly usedas input into common data mining algorithms without any preprocessing. Thus, itis worth to mention that the motivation behind the proposed scheme is to stronglysatisfy data mining input requirements.

2.1. Music representation and AI

Artificial Intelligence was early related to music representation and analysis withinthe computer music field. In general, the application of artificial intelligence tech-niques to music representation and analysis is based on either a Gestalt-based ap-proach, where a predefined set of rules or principles is used, or on a memory-basedapproach, where a corpus of grouping structures of previously encountered musicalpieces is used.

A lot of AI methodologies were applied as mathematical models, genetic algo-rithms, neural networks, hybrid systems and machine learning - symbolic systems.For instance, following mainly the Gestalt-based approach, there have been numer-ous attempts to describe music in more or less grammatical terms. The commonidea to most of those approaches is that in music a grammatical formalism maybe used to give a finite (and therefore manageable) description of an infinite (andtherefore intractable) set of structures.

Moreover, machine learning tasks, like classification, prediction, forecasting, andthe extraction of patterns and regularities from data, were early used both in music

Page 4: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

4 C. Halkiopoulos, B. Boutsinas

practice and in music research.50 It seems that data analysis and knowledge dis-covery capabilities of machine learning methods are very promising, supporting thehuman analyst in finding patterns and regularities in collections of real data. Inmusic, as in various other applications, machine learning is often adopted throughinductive learning algorithms where concepts are learnt from examples. Musicalscores, as examples, have been also used as input to artificial neural networks, inorder to learn habitual characteristics within compositions.25 There are also someattempts based on analytical learning, like Explanation Based Learning51 wherethe learning system is provided with music knowledge in order to guide the learningprocess.

In the literature, the term “music data mining” has been related to the ap-plication of machine learning algorithms.42,53 Data mining in music analysis aimsat “detecting”, “discovering”, “extracting” or “inducing” of melodic or harmonic(sequential) patterns in given sets of composed or improvised works, (see Rollandand Ganascia42 for a definition). Lately, apart from mining music patterns form-ing traditional data sets, mining music patterns represented as data steams is alsoproposed.14

We have found only a few examples of using data mining association, classifica-tion and clustering algorithms in extracting general patterns for different musicalstyles in memory-based systems. In Shan and Kuo45 the application of associationrule mining is used in order to find out the syntactic description of musical style.The authors chose to represent chords in whole melody or in chorus as a musicfeature that influence musical style. Items, in input data set, are formed by eitherchords, or bi-grams: adjacent pairs of chords or n-grams: a sequence of chords. InDannenberg et al.10 artificial neural networks, linear and Bayesian classifiers areused for the same problem. Also, the combination of rules extracted by ensemble ofsimple classifiers is used in Widmer,52 in order to extract rules covering the expres-sive music performance. In Liu et al.29 a hierarchical clustering algorithm is usedfor music clustering based on key. In Hothker20 clustering is applied to 88 ChineseShanxi melodies from the city of Hequ and 30 German children songs from theEssen database to extract abstract motive sequences.

2.2. The proposed scheme

Melodies should be represented in a multi-dimensional space. Examples of suchdimensions are pitch, duration, dynamics and timbre. Thus, as in most of musicrepresentation schemes proposed in the literature, we choose to represent pitch andduration as basic acoustical music features. However, the proposed approach treatspitch and duration separately. To our knowledge, in the proposed in the literaturemusic representation schemes, the pitch and duration representations of a melodyare kept together within the representation of notes.

The proposed music representation scheme (preliminary results have been pre-sented in Halkiopoulos and Boutsinas16) can be used for data mining analysis which

Page 5: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

Automatic interactive music improvisation based on data mining 5

aims at learning general patterns for both pitch and duration in certain musicalstyles. Input data are melodies of musical pieces, i.e. sequences of notes. In a poly-phonic pattern, we consider that the first voice constitutes a melody.

2.2.1. Pitch representation

The proposed scheme adopts an absolute pitch representation measuring the ab-solute values of the events in series. Although many computer-aided musical appli-cations adopt an absolute numeric pitch and duration representation, it is stated8

that the absolute pitch encoding may be insufficient for applications in tonal mu-sic, as it discards tonal qualities of pitches and pitch intervals. For example, atonal transportation from a major to minor key results in a different encoding ofthe musical passage and thus exact matches cannot detect the similarity betweenthe two passages. Thus, transpositions are not accounted for (e.g. the repeatingpitch motive in bars 1 & 2 in Fig. 1, taken from Cambouropoulos et al.8). Trans-position is paramount in understanding musical patterns. Thus, pattern-matchingand pattern-induction algorithms are developed primarily for sequences of pitchintervals.8 However, association rule mining1 for instance, could extract the rule:C#,D ⇒ C, (i.e. melodies that include C# and D also include C), if input datainclude sufficient number of bars identical to the first bar in Fig. 1. But such a rule,for various analysis purposes (e.g. composition or matching), could represent alsothe fourth bar in Fig. 1.

Fig. 1. Beginning of theme of the Amajor sonata by Mozart

The proposed representation scheme is based on a typical MIDI channel as thesource of melodies. In what follows, we describe pitch representation through anexample application to the musical piece shown in Fig. 2.

Fig. 2. An example musical piece.

Initially, the input melody is defined using the information provided by a typical

Page 6: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

6 C. Halkiopoulos, B. Boutsinas

MIDI channel message sequence, (a number from 0 to 127 for every possible notepitch, Key signature, etc), with the help of msq files.26

The proposed system adopts a memory-based approach, opposed to a Gestalt-based approach. In listening to a piece of music, the human perceptual systemsegments the sequence of notes into groups or phrases that form a grouping struc-ture for the whole piece. However, several different grouping structures may becompatible with a melody, i.e. a sequence of notes. Gestalt principles of proximityand similarity and the principle of melodic parallelism could be used for segmentingthe melodies. If we wish to propose a memory-based approach to music as a seriousalternative to a Gestalt-based approach, we should address the question of how anystructure can be acquired if we do not have any structured pieces in our corpus tostart with.

Thus, the proposed music representation scheme imposes that input melody issegmented into fragments. A new table is included in the input database, in whicha new line is created for each fragment, based on the primary line that has beenimported by the msq file by name midi note : [60,64,60,62,64,65,67,59,60] (removingthe double entries in which velocity value = 0). Then, each fragment is furthersegmented into fragments that have the same melodic direction, i.e. either upwardsor downwards, such as: [60,64],[64,60],[60,62,64,65,67],[67,59],[59,60].

Since the input records are fragments that have the same melodic direction, themelody segmentation is a straightforward task that could be performed automati-cally. However, in the general case, one could choose certain fragments of a melodyby adopting an automatic (e.g. Cambouropoulos7) and/or manual melodic segmen-tation technique. However, it is true that there are a lot of acceptable segmentationsof a musical piece.

For an efficient application of association rule mining algorithms, the final frag-ments are sorted in ascending order of midi note. Moreover, a new column is addedholding information about the melodic direction, i.e. ascending (1) or descending(0). Thus, the input table for association rule mining, called “melody”, is formedas in Table 1.

Table 1. Table “melody”

id direction note No1 note No2 note No3 note No4 note No5

· · · · · · · · · · · · · · · · · · · · ·T1 1 60 64T2 0 60 64T3 1 60 62 64 65 67T4 0 59 67T5 1 59 60· · · · · · · · · · · · · · · · · · · · ·

For classification and clustering each final fragment is represented as a 128 di-mensional binary vector, since each one of its notes corresponds to a number from

Page 7: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

Automatic interactive music improvisation based on data mining 7

0 to 127 (midi note number). The existence of a specific note in a fragment is in-dicated by “1” while its absence by “0”. Moreover, a column is also added holdinginformation about the melodic direction, i.e. ascending (1) or descending (0). Thus,the corresponding input table, called “melody s” is formed as in Table 2.

Table 2. Table “melody s”

id direction · · · 59 60 61 62 63 64 65 66 67 68 · · ·

· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·T1 0 · · · 0 1 0 0 0 1 0 0 0 0 · · ·T2 1 · · · 0 1 0 0 0 1 0 0 0 0 · · ·T3 0 · · · 0 1 0 1 0 1 1 0 1 0 · · ·T4 1 · · · 1 0 0 0 0 0 0 0 0 0 · · ·· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·

2.2.2. Duration representation

Rhythm is the arrangement of sounds in time. Meter animates time in regular pulsegroupings, called measures or bars. The time signature (variable TS) or metersignature specifies how many beats are in a measure, and which value of written noteis counted and felt as a single beat. Through increased stress and attack (and subtlevariations in duration), particular tones may be accented. There are conventionsin most musical traditions for a regular and hierarchical accentuation of beats toreinforce the meter.

The key idea of the proposed representation scheme is to indicate which discretevalues of time a rhythm event happens. It does not adopt duration ratios. Thus,according to the proposed scheme, the rhythmic patterns shown in Fig. 3 (taken fromCambouropoulos et al.8) do not match. Of course, one could argue that durationrations could result in mismatching of the left rhythmic pattern in Fig. 3 to theone shown in Fig. 4, which is not true. Note that the proposed scheme representsduration in such a way that the left rhythmic pattern in Fig. 3 and the one shownin Fig. 4 match. The latter is confirmed also by an experiment in HofmannEngl18

investigating the splitting of durations, where the result is that the smaller the splitratio the larger the measured similarity. On the other hand, association rule miningfor instance, encourage the items in transactions to be sorted. This could not beachieved using duration rations.

The proposed representation scheme is based on a typical MIDI channel as thesource of rhythm patterns. In what follows, we describe duration representationthrough an example.

According to MIDI Representation System, time intervals are defined by thevalue of variable “Ticks”. First, we convert all the MIDI files with the value ofTicks equal to t, i.e., the number of ticks for “whole time”. For the analysis ofrhythm patterns, the maximum rhythmic length is assigned to i bars of “whole

Page 8: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

8 C. Halkiopoulos, B. Boutsinas

Fig. 3. Rhythmic patterns matching at thelevel of duration ratios.

Fig. 4. Rhythmic patterns matching at thelevel of duration ratios.

time”, namely upto the value t × i. The latter constraint is imposed by the database management system used for the implementation. For example, if t = 64 weuse the time intervals described in Table 3.

Table 3. Time intervals

64 Whole Note (1)32 Half Note (2)16 Quarter Note (4)8 Quaver (8)4 Semi Quaver (16)2 Demi Semi Quaver (32)1 Hemi Demi Semi Quaver (64)

For association rule mining, rhythm patterns of extracted fragments described inthe previous subsection are represented in the table of the database called “rhythm”,in which a new line is created for each melody final fragment. For example, settingt = 64 and i = 2, the table “rhythm” is formed as in Table 4. Each final fragmentis represented as a 128 dimensional binary vector.

Table 4. Table “rhythm”

· · · · · ·T1 0 16 24 32 48 56 63 79 96· · · · · ·

For classification and clustering each final fragment is also represented as a 128dimensional binary vector, since each time corresponds to a number of ticks. Anevent within a fragment is indicated by “1” while its absence by “0”. Thus, thecorresponding input table, called “rhythm s” is formed as in Table 5.

Table 5. Table “rhythm s”

id 0 · · · 16 · · · 24 · · · 32 · · · 48 · · · 56 · · · 63 · · · 79 · · · 96 · · ·

· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·T1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·

Page 9: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

Automatic interactive music improvisation based on data mining 9

3. The adopted musical pattern similarity measure

In the last decade, musical pattern similarity is a major subject of research incomputer music. A common approach of musical pattern similarity is to compare aquery to a melody as a whole, using a similarity measure.

Musical pattern similarity can be particularly useful for various tasks incomputer-assisted music analysis, such as melody identification and musical re-trieval. Moreover, musical pattern similarity is used for melodic search and compar-ison which are essential components for computer accompaniment systems. Otherexample applications of musical pattern similarity are adaptive music editing orcomposition systems as well as automatic classification and characterization ofstyles, authors or music performers.

Two parameters are considered for musical pattern similarity: Pitch and Du-ration. However, there are attempts to consider more parameters or to considerpsychological instead of physical parameters.18

The proposed system needs a musical pattern similarity measure in order toretrieve the most similar, to the user input, general musical pattern stored in itsknowledge base. The proposed system adopts a similarity measure used in clus-tering algorithms. After discussing the various musical pattern similarity measurespresented in the literature, we present the adopted measure.

3.1. Related musical pattern similarity measures

In the computer music literature, there are various proposed similarity measures.Earlier attempts were predominantly influenced by string matching algorithmswhich are based on the edit distance between a source string and a target string (seee.g. exact6 or approximate41 pattern matching, the dynamic programming,46 etc).The edit distance is calculated in terms of what and how many edit operators (suchas delete, insert and replace) have to be applied in order to turn source string into atarget string. Melodic similarity between a source and a target melody is calculatedas the minimal sum of the weights that result from transforming the source melodyinto the target melody.

However, there are also other measures such as the geometric measure,30 thetransportation distances,47 the musical artist similarity,13 probabilistic similaritymeasures for MIDI21 or GUIDO,19 the statistical similarity measure12 and graphbased similarity.27 Moreover, various comparative studies have been presented inthe literature (e.g. Mullensiefen and Frieler37).

There are also indexing techniques where complete monophonic pieces are in-dexed for their motifs, using classes of motif contours. Then, similarity relations be-tween these classes can be used for a very efficient search (e.g. Weyde and Datzko49).

Finally, a visualization of the differences of musical patterns30, with respect toa similarity measure, is suggested in order to support user.

Such similarity measures are dedicated to musical patterns. For instance, theedit distance presented in Hothker20 is defined as:

Page 10: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

10 C. Halkiopoulos, B. Boutsinas

d(X,Y ) =(Pn

i=1Pn

j=i+1xori,j(X,Y ))

((n−1)n/2) ,where X = x1, . . . , xn, Y = y1, . . . , yn are abstract motive sequences (musical pat-terns) and

xori,j(X,Y ) ={

0, if (xi = xj

∧yi 6= yj)

∨(xi 6= xj

∧yi = yj);

1, if (xi = xj

∧yi = yj).

Also, the geometric measure31 is defined as:d(X, Y ) =

∑ni=1|xi − yi −m|wkwstress ,

where X = x1, . . . , xn, Y = y1, . . . , yn are musical patterns with xi, yi be the pitchof the notes, m is the number of semitones that the second tune pattern is trans-posed to minimize the difference, wstress the weight derived from metrical stress,and wk the width of window k. The measure is calculated in time windows. A timewindow unit is the duration of the shortest full note at that particular point in thescore.

The proposed system adopts a similarity measure used in clustering algorithms.Note that, at first, similarity measures have been widely studied in the scientificfield of clustering. In clustering algorithms, if the musical patterns are representedby using sequences of numerical data, then such (dis)similarity measures are thesquared Euclidean Distance, the inner product, etc. If they are represented by us-ing sequences of categorical data, then one solution is to code the categorical datanumerically and, subsequently, to use numerical clustering methods. The weaknessof this solution is that the semantics of the categorical data may be lost. The usualsolution to the latter problem is the overlap measure which defines dissimilaritybased on the number of mismatches. Under such simple but commonly used mea-sure, for two possible data values xi and xj , the dissimilarity is defined as zero(0) when xi and xj are identical and one (1) otherwise. Thus, edit distance is akind of overlap measure. The weakness of the overlap measure is that it gives equalimportance to each data attribute.

A lot of variants of the overlap measure are presented in the literature tryingto tackle this problem. For instance, in Medin and Schaffer35 dissimilarity is repre-sented as parameters corresponding to those attributes that two objects differ in.Those parameters are set to the interval (0, 1]. Note that in the case where thoseparameters are set to zero, dissimilarity is reduced to the standard overlap mea-sure. As another example, consider the k-modes clustering algorithm22 applied tocategorical sequences of size m, i.e., described by m categorical attributes. In thisclustering algorithm the chi-square distance15 is used, which takes into account thefrequencies of the attribute values with respect to the whole data set. Formally,if A,B are two categorical sequences of size m then the dissimilarity measure isdefined as22:dx2(A,B) =

∑mj=1

(naj+nbj

)

(najnbj

) δ(aj , bj), where naj , nbj are the numbers of input ob-jects that have values aj and bj for attribute j and

δ(aj , bj) ={

0, if aj = bj ;1, if aj 6= bj .

Page 11: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

Automatic interactive music improvisation based on data mining 11

Finally, there are also various other clustering similarity measures applied tostructured data, (see Boutsinas and Papastergiou5 for an overview), e.g. tree struc-tured data, which would not significantly contribute to musical pattern similarity.

3.2. The adopted clustering similarity measure

The proposed system (POLYHYMNIA) adopts a recent clustering measure34, al-though it has a high time complexity. It is based on the above dissimilaritymeasure22 and key elements of the methodological framework of the ELECTREI multicriteria method.44 This four-step dissimilarity measure is structured accord-ing to three basic principles: (1) The degree of resemblance between an objectand a mode, identified according to a difference which is based on the number ofmatches/mismatches in their common attributes, (2) the strength of the mode interms of the attributes that positively influence the above resemblance and (3) theexistence of attributes (“veto attributes”) in which the difference between the objectand the mode is considered so significant that the object cannot be assigned to thecluster signified by the mode. Based on these principles, the dissimilarity measurechooses the most appropriate mode and assigns a particular object to the mode’scorresponding cluster.

In the proposed system, we consider that musical patterns are represented by us-ing sequences of categorical data. In order to evaluate clustering similarity measureswhen applied to musical pattern similarity, we formed train datasets from 40 Bach’sChorales (www.jsbchorales.net), after transposing all to C Major key and adoptingthe proposed pitch and rhythm representations described in Section 2. More specif-ically, we formed two different train datasets for pitch and rhythm respectively. Thesource of melodies is a typical MIDI channel.

For the analysis of pitch, each melody is segmented into melody fragments (seeprevious Section). Each melody fragment is further segmented into final pitch sub-fragments that have the same melodic direction, i.e. either upwards or downwards.Pitch train dataset is stored in a table, where a new line is created for each final pitchsubfragment. Each final pitch subfragment is represented using a 128-dimensionalbinary vector. Pitch train dataset has 950 rows.

For the analysis of rhythm, each rhythm fragment is assigned to 2 or 4 bars of“whole time”, namely upto the value 64x2=128 or 64x4=256 (64 ticks for “wholetime”). Thus, we use two different train datasets for rhythm. Those rhythm traindatasets were stored in tables, where a new line is created for each rhythm fragment.Each rhythm fragment is represented using a a 128-dimensional or a 256-dimensionalbinary vector, since we chose the first 2 or 4 bars from each Choral respectively.Each rhythm train dataset has 40 rows.

Moreover, adopting the proposed representation scheme, we form two testdatasets containing melody fragments to be tested for similarity to those of thetrain datasets. Those melody fragments are synthesized by a musician (Chris-tos Pouris, Composer, Pianist, Director of the National Conservatory-Annex of

Page 12: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

12 C. Halkiopoulos, B. Boutsinas

Vrilissia-Athens, Greece, [email protected]) in such a way that each one of them isthe most similar to one of the fragments in train datasets, according to the musician,as far as pitch or rhythm is concerned. Melody test dataset consists of 99 rows whilerhythm test dataset consists of 5 rows. Then, for each fragment in test datasets, itsmost similar in corresponding train datasets was searched automatically by usingthe edit distance, the overlap measure,22 and the adopted measure.34

Table 6. evaluation results

attribute measure hits returned fragments

pitch edit distance 95.5% 5.3overlap 97% 6.2adopted 100% 1

duration edit distance 94% 3.4overlap 98% 4.2adopted 100% 1

Experimental tests show that the edit distance and overlap measures are notsuitable for the musical pattern similarity task of the proposed system, since theirapplication results in a set of equally similar patterns w.r.t. either pitch or rhythm.For instance, as far as pitch is concerned, the application of the edit distance measureresults in 5.3 returned fragments on the average as equally most similar to a testfragment (see column ’returned fragments’ in Table 6). Thus, at least 5 fragmentson the average are returned as most similar to each test fragment. Of course, themost similar fragment according to the musician was included in the set of mostsimilar fragments in 95.5% of the pitch cases for the edit distance (see column ’hits’Table 6).

However, the proposed system has to select only one fragment out of the set ofmost similar fragments and there is no way to choose the most similar fragmentaccording to the musician. The adopted measure calculates only one fragment asthe most similar. Moreover, it exhibits 100% accuracy for pitch (w.r.t. musicianjudgement). Note that accuracy results are similar as far as rhythm experimentationis concerned.

Moreover, the adopted measure can exploit the “veto attributes” in order toguide similarity even in cases where sophisticated similarity measures, dedicated tomusical patterns, could not handle correctly. For instance, a C-major (60, 64, 65,67) and a C-minor (60, 63, 65, 67) sequence can match, e.g. using δ-approximatematching with tolerance δ = 1.8 Using the adopted measure, a “veto” for 63 or64 can be assigned based on Key signature. Thus, such incorrect matchings can beexcluded.

4. System Architecture

The proposed system, POLYHYMNIA, is a musical interactive system acting asmelody continuator. For each musical pattern given by the user, it recalls a sim-

Page 13: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

Automatic interactive music improvisation based on data mining 13

ilar general pattern stored in its memory which after a random modification isoutputted. The system’s ability to collaborate with the user is based on parsingcontinuous streams of natural data (called musical patterns or motifs) and thendetermining indirectly the functions of human gestures by choosing the next mu-sical pattern following the current past context. Such interaction is analogous to aconversation paradigm; there is a sequence of spontaneous utterances determinedwithin a collaborative structure that is interactively managed by the participants.

The key ideas behind the proposed system is to treat pitch and rhythm of eachmusical pattern separately and also to form its response to user input by combiningmodified general patterns for pitch and rhythm stored in its knowledge base. Thesize of the latter is small, since it does not consist of a great number of musicalpatterns extracted from known melodies of a certain musical style (e.g. jazz), as itis the usual case. Instead, it consists of data mining rules. Those rules are extractedin a preprocessing phase, from sets of musical patterns belonging to known melodiesof certain musical styles. Thus, the size of the knowledge base supports its responsein real time.

The system architecture is shown in Fig. 5. At first, the musician determines theinput musical pattern to which a response from the system is required. The musicianuses a key press on the computer keyboard in order to signal both the beginningand the end of the input musical pattern. Then, the system transforms the inputmusical pattern from MIDI to the proposed knowledge representation scheme (seeSection 2).

In general, the knowledge base of the proposed system consists of classification,clustering and association rules extracted during a preprocessing phase. However,in this paper, we evaluate it for only association rules. The knowledge base couldbe tailored to any certain musical style. This is accomplished by using a trainingset of musical patterns taken from melodies of a certain musical style. Note thatthe set of data mining rules included in the knowledge base of the system are alsorepresented by using the same knowledge representation scheme.

Thus, the system can find the most similar to the input musical pattern datamining rule, by using the similarity measure presented in Section 3. The selecteddata mining rule is modified by randomly applying one of the following four certainoperators: “substitute”, “insert”, “delete” and “swap”. The implementation of thesesimple operators is easy, compared to similar operators, for instance to those definedwithin evolutionary computer music.36 The “substitute” operator randomly choosesa pitch or a duration of the selected data mining rule and changes it to another pitchof the same key signature or to another duration. The “insert” operator inserts toa random location a pitch of the same scale or a duration. The “delete” operatordeletes a randomly chosen pitch or duration of the selected data mining rule. The“swap” operator randomly selects either two pitches or two duration and swapstheir location within the selected data mining rule. Note, that only one operatoris applied each time. An operator is randomly and independently selected both forpitch and for duration.

Page 14: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

14 C. Halkiopoulos, B. Boutsinas

Fig. 5. System Architecture

Then, the system aligns pitches and durations by trying to assign a duration toa pitch or the opposite, according to what set is smaller. Finally, if needed, restsare added properly in order to fit the time signature. Notice that both the key andthe time signature are inputs to the system.

According to the above, the retrieved musical pattern is not just a version of theinput musical pattern. The retrieved musical pattern is generated by an alignmentof two similar general musical patterns, one for pitch and the other for duration.That is, the similarity of the input musical pattern is not based on pitch and rhythmsimultaneously, as it is the usual case in the related systems. In the proposed system,the similarity is defined independently for pitch and for duration. Also, notice thatthe random perturbation of the general musical patterns by applying the operators

Page 15: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

Automatic interactive music improvisation based on data mining 15

further contributes in generating an improvisation.Finally, the system transforms the final pattern to MIDI and notifies the user

that it is ready to deliver its response to user’s input. Afterwards, the system comesinto a waiting cycle. It is assumed that the user continues improvisation after signal-ing the beginning and the end of the input musical pattern. After system signalingits readiness to respond, the user chooses the proper time and signals system’simprovisation. The whole cycle is repeated at user’s will.

5. Experimental results

In order to evaluate POLYHYMNIA as a melody continuator, we set up, as test in-puts, two different knowledge bases using association rules for two different musicalstyles: jazz and Bach’s Chorales. Notice that a lot of research in music analysis hasbeen performed for these two styles already.

More specifically, using the proposed music representation scheme, we repre-sented the 414 known Bach’s Chorales (www.jsbchorales.net) and 101 jazz melodies.For each musical style, as far as pitch is concerned, we formed a training set con-sisting of all the fragments that have the same melodic direction, in all the inputmelodies. Therefore, there was not any segmentation of melodies. Thus, the trainingsets (see tables “melody” and “rhythm” in Section 2) were built automatically. Asfar as duration is concerned, we formed a training set consisting of fragments of twobars.

In the case of Bach’s Chorales, 55749 melodic fragments of the same melodicdirection were created for pitch, while 1777 two-bar melodic fragments were createdfor duration. Then, the Apriori algorithm1 for association rule mining was applied.In this way, 409 association rules were extracted for pitch, after setting minimumsupport to 2% and minimum confidence to 0%. Also, 1543 association rules wereextracted for pitch, after setting minimum support to 5% and minimum confidenceto 0%. In the case of jazz melodies, 274783 melodic fragments of the same melodicdirection were created for pitch, while 871 two-bar melodic fragments were createdfor duration. Applying the Apriori algorithm, 172 association rules were extractedfor pitch, after setting minimum support to 2% and minimum confidence to 0%.Also, 3765 association rules were extracted for pitch, after setting minimum sup-port to 5% and minimum confidence to 0%. Note that the above rules formed theknowledge base of POLYHYMNIA for this test. A typical such rule consists of 3-5pitches or 8-12 durations, e.g.:

Table 7. Example rules

extracted from pitch duration

Bach’s Chorales 60,66,67⇒64 48,96,128,160,176,192,208,224⇒256Confidence=92% Support=24% Confidence=95% Support=21%

Jazz melodies 62,63,64,65⇒60 48,64,80,96,112,128,160,192,208,224,240,256,288⇒176Confidence=88% Support=22% Confidence=67% Support=12%

Page 16: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

16 C. Halkiopoulos, B. Boutsinas

It is difficult to evaluate music quality based on some sort of measures. Thus, wehave conducted experimentations with the proposed system assessing two aspects:assessing the aesthetic quality of its output results and assessing how the latterdiffer from human output results.

In order to assess the aesthetic quality of improvisations generated by POLY-HYMNIA, we set up a web page48 uploading many audio examples in the form ofpairs consisting of input and output musical patterns.

For instance, in Fig. 6, one input musical pattern composed according to Bach’sChorales style is depicted (the first two bars) along with the musical pattern re-turned by POLYHYMNIA (the last two bars). Also, in Fig. 7, one input musicalpattern composed according to jazz style is depicted (the first two bars) along withthe musical pattern returned by POLYHYMNIA (the last two bars).

Fig. 6. Input and output musical patterns for Bach’s Chorales style

Fig. 7. Input and output musical patterns for jazz style

In Fig. 8, a whole melody is composed by POLYHYMNIA based on Bach’sChorales style, after giving repeatedly every successive output as a new input for anew retrieval phase.

Moreover, we have conducted experimentations rating how system’s output dif-fers from human’s one, as in Pachet.38 We have conducted tests to check whetherlisteners could tell when the system is playing or not.

We formed three different groups of listeners. The first one consisted of 20 ex-perts, i.e., teacher musicians at the National Conservatory-Annex of Vrilissia inAthens, Greece. The second one consisted of 20 student musicians of the latterconservatory. While the third one included 21 listeners without prior studies in mu-sic. To the listeners of the first and second group, during a lecture-demonstrationclass, we presented two different continuations of 30 melodies taken from 30 dif-ferent Bach’s Chorales. The first continuation was composed by POLYHYMNIA

Page 17: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

Automatic interactive music improvisation based on data mining 17

Fig. 8. A melody composed by POLYHYMNIA

(without any post processing of the output) while the second one by an expert(Christos Pouris, Composer, Pianist, Director of the National Conservatory-Annexof Vrilissia-Athens, Greece, [email protected]). After each melody demonstration,listeners of the first and second group were asked to indicate which continuationseems to be the original. Results are shown in Table 8. It seems that most listenersconsidered POLYHYMNIA’s output as the original one.

Afterwards, the official continuation along with those composed by POLYHYM-NIA and the expert were demonstrated and for each continuation the listeners wereasked to indicate whether they consider it similar to the official one. Results areshown in Table 9. It seems that more than 2/3 of the listeners in the first and secondgroup considered POLYHYMNIA’s output (as well as expert’s output) similar tothe original one.

Finally, the official continuation along with that composed by POLYHYMNIAwere demonstrated and for each melody the listeners of the third group were askedto indicate whether they consider the continuations similar. Results are shown inTable 10.

6. Discussion and conclusion

Using the set up presented in the previous section, POLYHYMNIA was testedas melody continuator by different human performers (teacher musicians at theNational Conservatory-Annex of Vrilissia in Athens, Greece) on jazz and Bach’sChorales. Performers agree on that POLYHYMNIA is very promising and sometimes they were stumped by its response, while usually the system inspires them.Notice that performers evaluated the overall output of POLYHYMNIA. The ex-tracted pitch and rhythm patterns as well as the randomly applied operators werenot known to the performers.

Moreover, POLYHYMNIA could be used for synthesizing a whole melody, simplyby repeatedly giving as input the last output musical pattern (see POLYHYMNIA’sweb page48 for examples).

As a technical result, the use of a clustering similarity measure for musical pat-tern similarity, based on the proposed specific music representation scheme, seems

Page 18: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

18 C. Halkiopoulos, B. Boutsinas

Table 8. POLYHYMNIA vs expert evaluation results

melody POLYHYMNIA (group 1) expert (group 1) POLYHYMNIA (group 2) expert (group 2)

1 55% 45% 65% 35%2 52.5% 47.5% 70% 30%3 50% 50% 60% 40%4 52.5% 47.5% 55% 45%5 47.5% 52.5% 45% 55%6 60% 40% 70% 30%7 47.5% 52.5% 75% 25%8 60% 40% 50% 50%9 47.5% 52.5% 45% 55%10 62.5% 37.5% 65% 35%11 50% 50% 45% 55%12 47.5% 52.5% 50% 50%13 65% 35% 75% 25%14 62.5% 37.5% 65% 35%15 52.5% 47.5% 75% 25%16 47.5% 52.5% 50% 50%17 65% 35% 65% 35%18 67.5% 32.5% 75% 25%19 62.5% 37.5% 65% 35%20 67.5% 32.5% 75% 25%21 50% 50% 45% 55%22 65% 35% 75% 25%23 50% 50% 65% 35%24 47.5% 52.5% 50% 50%25 62.5% 37.5% 75% 25%26 50% 50% 45% 55%27 40% 60% 40% 60%28 37.5% 62.5% 30% 70%29 47.5% 52.5% 45% 55%30 50% 50% 45% 55%

average 54.08% 45.92% 58.5% 41.5%

very encouraging and tends to prove the pertinence of its application to automaticinteractive music improvisation. The latter is also true for using data mining rulesas general musical patterns of pitch and rhythm separately. Of course, the aboveare true under the subjectivity associated with the performed experimental results.

On the other hand, there are technical issues that must be addressed. For in-stance, the format of user input. Theoretically, the length of the input music patternis not limited, since any size could be handled by the similarity measure. However,due to the way the knowledge base is built (as melodic fragments that have the samemelodic direction, i.e. either upwards or downwards) the output music pattern canusually have a small size (up to six in the presented experiments). Of course, a lotof heuristics could be applied in order to tackle the problem, e.g. to combine morethan one general pattern from the knowledge base or to extensively use the “insert”operator during the modification of the recalled from the knowledge base rule.

In general, the proposed system is designed to interact with a human in realtime. The main designed characteristics are imposed by time constraints. Thus,

Page 19: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

Automatic interactive music improvisation based on data mining 19

Table 9. Similarity evaluation results

melody POLYHYMNIA (group 1) expert (group 1) POLYHYMNIA (group 2) expert (group 2)

1 80% 87.5% 90% 95%2 75% 85% 95% 95%3 72.5% 85% 80% 90%4 77.5% 82.5% 75% 80%5 70% 77.5% 70% 75%6 82.5% 87.5% 90% 85%7 70% 75% 65% 70%8 60% 70% 55% 65%9 50% 60% 50% 55%10 90% 92.5% 85% 90%11 70% 52.5% 75% 55%12 57.5% 50% 55% 60%13 80% 60% 75% 65%14 60% 75% 65% 70%15 80% 87.5% 95% 85%16 60% 60% 75% 70%17 80% 52.5% 85% 65%18 77.5% 75% 80% 70%19 80% 52.5% 75% 65%20 60% 50% 55% 55%21 82.5% 52.5% 75% 60%22 77.5% 87.5% 80% 90%23 60% 75% 75% 85%24 50% 52.5% 55% 55%25 77.5% 87.5% 80% 90%26 60% 60% 55% 55%27 45% 42.5% 35% 45%28 40% 37.5% 30% 35%29 47.5% 52.5% 50% 60%30 57.5% 42.5% 50% 55%

average 67.67% 66.92% 69.17% 69.67%

pitch and duration representation is designed to support the application of existingfast data mining algorithms without modifications. Also, the proposed similaritymeasure is adopted because it selects only one general musical pattern stored in theknowledge base as the most similar to the given one. Finally, the four simple oper-ators (“substitute”, “insert”, “delete” and “swap”) used for modifying the selectedgeneral musical pattern are adopted because of their easy and quick implementation.

Under other constraints, one could adopt other elaborating musical pattern simi-larity measures or operators. For instance, one could could use a similarity measurebased on edit distance20 and then combine the k most similar returned patternsusing operators of evolutionary computer music before allowing a human mentor todecide which is the best one.4

We plan to extend the music features that POLYHYMNIA can handle to static(e.g. key, tempo) and thematic (e.g. chords) features. To this end, we are currentlyworking on extending the proposed music representation scheme in order to rep-resent actual performances of melodies by human performers. Performances could

Page 20: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

20 C. Halkiopoulos, B. Boutsinas

Table 10. POLYHYMNIA vs origi-nal similarity evaluation results

melody POLYHYMNIA (group 3)

1 100%2 95.24%3 90.48%4 85.71%5 80.95%6 85.71%7 61.90%8 76.19%9 66.67%10 100%11 52.38%12 61.90%13 71.43%14 76.19%15 80.95%16 76.19%17 61.90%18 71.43%19 76.19%20 71.43%21 80.95%22 95.24%23 85.71%24 71.43%25 95.24%26 66.67%27 57.14%28 47.62%29 76.19%30 66.67%

be represented by tempo and loudness information. Thus, the data mining analysiswould additionally provide general expression rules for the application of dynamics(crescendo vs. decrescendo) and tempo (accelerando vs. ritardando). Such expres-sion rules would enrich system’s knowledge base with general musical patterns forexpressive performance. Thus, POLYHYMNIA could automatically generate ex-pressive performance of outputted musical patterns.

Extending the music features that POLYHYMNIA can handle is a prereq-uisite for applying the proposed music representation scheme and the adoptedsimilarity measure to other related problems, such as the automatic genreclassification3,23,28,32,35 and the composer identification problem (see Music In-formation Retrieval Evaluation eXchange -MIREX- contests http://www.music-ir.org/).

We also plan to include more sophisticated operators for modifying the selectedfrom the knowledge base data mining rule. More specifically, we plan to investigatethe application of certain rules taken from music theory for the modification.

Page 21: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

Automatic interactive music improvisation based on data mining 21

Finally, we plan to exploit the information included in the classification andclustering rules also, since the presented experimental tests are based on associationrules only. This can be achieved by adding classification and clustering rules tothe system’s knowledge base. Then, the response to user input can be achieved byknowledge included in those rules. For instance, given a certain input pitch/durationin a certain musical style, a classification rule indicates what pitches/durations canbe combined with the input pitch/duration in this musical style. As another exampleof use, given an input set of pitches/durations in a certain musical style, a clusteringrule indicates another set of pitches/durations which is the most similar to the inputset general representative (medoid) of this musical style.

7. Acknowledgments

We wish to thank anonymous referees for their useful comments on this paper. Also,we wish to thank N. Mastroyannis for his help during the tests.

References

1. R. Agrawal, H. Mannila, R. Srikant and A.I. Verkamo, Fast Discovery of AssociationRules, in Advances in Knowledge Discovery and Data Mining, eds. U.M. Fayyad, G.Piatetsky-Shapiro and P. Smyth (AAAI Press/MIT Press, 1996), pp.307–328.

2. G. Assayag, S. Dubnov and O. Delerue, Guessing the Composer’s Mind: ApplyingUniversal Prediction to Musical Style, in Proc. of the International Computer MusicConference, International Computer Music Association, (1999), pp.496–499.

3. R. Basili, A. Serafini and A. Stellato, Classification of musical genre: a machine learningapproach, in Proc. of Int. Conf. on Music Information Retrieval, ISMIR2004, (2004).

4. J.A. Biles, GenJam: A Genetic Algorithm for Generating Jazz Solos, in Proc. of theInternational Computer Music Conference, International Computer Music Association,(1994), pp.131–137.

5. B. Boutsinas and T. Papastergiou, On clustering tree structured data with categoricalnature, Pattern Recognition. 41 (Elsevier Science, 2008), pp.3613–3623.

6. E. Cambouropoulos, Towards a General Computational Theory of Musical Structure,Ph.D. Thesis, (University of Edinburgh, 1998).

7. E. Cambouropoulos, Musical Parallelism and Melodic Segmentation, in Proc. of theXII Colloquium of Musical Informatics, (Gorizia, Italy, 1998).

8. E. Cambouropoulos, T. Crawford and C.S. Iliopoulos, Pattern Processing in MelodicSequences: Challenges, Caveats and Prospects, Computers and the Humanities. 34(4)(2000).

9. D. Cope, An expert system from computer-assisted composition, Computer Music Jour-nal. 11(4) (1987) 30–46.

10. R.B. Dannenberg, B. Thom and D. Watson, A Machine Learning Approach to MusicalStyle Recognition, in Proc. of International Computer Music Conference, ICMC’97,(1997).

11. R.B. Dannenberg, Music Information Retrieval as Music Understanding, in Proc. of2nd Annual Intern. Symposium on Music Information Retrieval, (2001) pp.139–142.

12. R. Engelbrecht, Statistical Comparison Measures for Searching in Melody Databases,Tech. Report. University of Bonn, (2002).

13. D.P.W. Ellis, B. Whitman, A. Berenzweig and S. Lawrence, The Quest for GroundTruth in Musical Artist Similarity, (2002).

Page 22: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

22 C. Halkiopoulos, B. Boutsinas

14. M.M. Gaber, A.Zaslavsky and S.Krishnaswamy, Mining data streams: a review, ACMSIGMOD Record. 34(1) (2005).

15. M.J. Greenacre, Theory and Applications of Correspondence Analysis, (AcademicPress, 1984).

16. C. Halkiopoulos and B. Boutsinas, Music Representation for Analysis using Data Min-ing, in Proc. of Seventh Annual Conference of Music Theory and Analysis, (Belgrade,May, 2009).

17. L. Hiller and L. Isaacson, Experimental Music, (New York: McGraw-Hill, 1959).18. L.J. HofmannEngl, Melodic similarity a theoretical and empirical approach, PhD The-

sis, (Keele University, UK, 2003).19. H. Hoos, K. Renz and M. Gorg, GUIDO/MIR - an experimental musical informa-

tion retrieval system based on guido music notation, in Proc. of Int. Conf. on MusicInformation Retrieval, ISMIR2001, (2001), pp.41-50.

20. K. Hothker, Modelling the Motivic Process of Melodies with Markov Chains, Com-puters and the Humanities. 35(1) (2001) 65–79.

21. N. Hu, B. Dannenberg, A.L. Lewis, A Probabilistic Model of Melodic Similarity, inProc. of the 2002 International Computer Music Conference, (San Francisco: Interna-tional Computer Music Association, 2002), pp.509–15.

22. Z. Huang, Extensions to the k-means algorithm for clustering large data sets withcategorical values, Data mining and Knowl. Disc.. 2 (1998) 283–304.

23. I. Karydis, A. Nanopoulos and Y. Manolopoulos, Symbolic musical genre classificationbased on repeating patterns, in Proc. of the 1st ACM workshop on Audio and musiccomputing multimedia, (2006), pp.53–58

24. R. Keller, M. Hunt, S. Jones, D. Morrison and A. Wolin, Blues for Gary: Design Ab-stractions for a Jazz Improvisation Assistant, Electronic Notes in Theoretical ComputerScience. 193 (2007) 47-60.

25. F.J. Kiernan, Score-based style recognition using artificial neural networks.26. S. Koepf and B. Haerpfer, The MSQ Project, (1998).27. O. Lartillot, Generalized Musical Pattern Discovery by Analogy from Local View-

points.28. T. Lidy, A. Rauber, A. Pertusa and J. Iesta, Improving Genre Classification by Com-

bination of Audio and Symbolic Descriptors Using a Transcription System, in Proc. ofthe 8th International Conference on Music Information Retrieval, (2007), pp.61–66.

29. Y. Liu, Y. Wang, A. Shenoy, W.-H. Tsai and L. Cai, Clustering Music Recordings bytheir Keys, in Proc. of Int. Conf. on Music Information Retrieval, ISMIR2008.

30. D. O Maidın, A Geometrical Algorithm for Melodic Difference, Melodic Compari-son: Concepts, Procedures, and Applications, Computing in Musicology. 11 (Cambridge,Massachusetts: MIT Press, 1998), pp.65–72.

31. D. O Maidın and M. Fernstrom, The Best of two Worlds: Retrieving and Browsing,in Proc. of the COST G-6 Conference on Digital Audio Effects (DAFX-00), (Verona,Italy, December 7-9, 2000).

32. B. Manaris, D. Krehbiel, P. Roos and T. Zalonis, Armonique: Experiments In Content-Based Similarity Retrieval Using Power-Law Melodic and Timbre Metrics, in Proc. ofInt. Conf. on Music Information Retrieval, ISMIR2008, (2008), pp.343–348.

33. R.L. de Mantaras and J.L. Arcos, AI and Music: From Composition to ExpressivePerformance, AI magazine. 23(3) (2002) 43–57.

34. N. Mastroyannis, I. Giannikos, B. Boutsinas and G. Antzoulatos, CL.E.KMODES:A Modified K-Modes Clustering Algorithm, Proc. Journal of the Operational ResearchSociety. 60(8) (2009) 1085–1095.

35. D.L. Medin and M.M. Schaffer, Context Theory of Classification Learning, Psycho-

Page 23: Automatic Interactive Music Improvisation Based on Data Mining

November 2, 2011 13:11 WSPC/INSTRUCTION FILE music˙improv˙l4

Automatic interactive music improvisation based on data mining 23

logical Review. 85(3) (1978) 207–238.36. E.R. Miranda, J. Al Biles, Evolutionary Computer Music, Springer, 2007.37. D. Mullensiefen and K. Frieler, Cognitive Adequacy in the Measurement of Melodic

Similarity: Algorithmic vs. Human Judgments, Computing in Musicology. 13 (2004)147–176.

38. F. Pachet, The Continuator: Musical Interaction With Style, in Proc. of InternationalComputer music Conference, (ICMA Gotheborg, Sweden, 2002).

39. G. Papadopoulos and G. Wiggins, AI Methods for Algorithmic Composition: A Survey,a Critical View and Future Prospects, (1993).

40. A.N. Robertson and M.D. Plumbley, Real-Time Interactive Musical Systems: AnOverview.

41. P-Y. Rolland, FlExPat: A Novel Algorithm for Musical Pattern Discovery, in Proc. ofthe XII Colloquium in Musical Informatics, (Gorizia, Italy, 1998).

42. P.Y. Rolland and J.G. Ganascia, Pattern Detection and Discovery: The Case of MusicData Mining.

43. R. Rowe, Interactive Music Systems, (MIT Press, 1992).44. B. Roy, Classement et choix en presence de points de vue muptiples : La methode

ELECTRE, R.I.R.O.. 8 (1968) 57–75.45. M.K. Shan and F.F. Kuo, Music style mining and classification by melody, IEICE

Transactions on Information and Systems. E86-D(4) (2003) 655-659.46. L.A. Smith, R.J. McNab, and I.H. Witten, Sequence-based melodic comparison: a

dynamic-programming approach, in Melodic Comparison: Concepts, Procedures, andApplications, Computing in Musicology, 11, (MIT Press, 1998), pp.101–117.

47. R. Typke, Music Retrieval based on Melodic Similarity, Doctoral Thesis, (UtrechtUniversity, 2007).

48. http://www.polyhymnia.gr, (2009).49. T. Weyde and C. Datzko, Efficient Melody Retrieval with Motif Contour Classes,

(2005).50. G. Widmer, On the Potential of Machine Learning for Music Research.51. G. Widmer, A Knowledge Intensive Approach to Machine Learning in Music.52. G. Widmer, Discovering Simple Rules in Complex Data - A Meta-learning Algorithm

and Some Surprising Musical Discoveries.53. G. Widmer, Using AI and Machine Learning to Study Expressive Music Performance-

Project Survey and First Report