Page  240 ï~~Automated Motive-Oriented Analysis of Musical Corpuses: a Jazz Case Study Pierre-Yves Rolland, Jean-Gabriel Ganascia Laboratoire Formes et Intelligence Artificielle (LAFORIA) Universite Pierre & Marie Curie, Paris, France { rolland, ganascia} Abstract In many music-related domains there has been a lot of interest in motives, which commonly designate rhythmic and/or melodic fragments related to a composer, improviser, or style. Motive-oriented musicological studies aim at putting to the fore stylistic characteristics of a creator or genre based on the use of recurrent motives. An example is T. Owens ' study (1974) of Charlie Parker's improvising style on a corpus of 190 solos. The aim of our research is to automate this type of studies. We seek to determine what knowledge needs to be introduced in a system if that system is to achieve results comparable to musicologists'. We use Owens' material and results as a reference example. In this paper we focus on the motive discovery task, a subjective and cognitively complex task whose automation is thus a difficult and interesting issue. We focus on the first step of our motive discovery process, viz. the local comparison of sequence pairs. We describe the dynamic programming algorithm we have implemented for that purpose, and present its advantages and limitations, which we evidenced through experiments. A method for optimizing the algorithm's parameters, and the results of its implementation, are then presented. 1. Introduction In music education and musicology, especially in the domain of jazz, as well as in computer music there has been a lot of interest about the use of what is alternatively called motives, patterns, formulae, ideas etc. Although their precise definition varies, those often refer to rhythmic and/or melodic fragments characteristic of a composer, improviser, or style. In a compositional or improvizational context, motives are assembled, modified and used in varied manners to compose melodies or improvised parts (Stammen & Pennycook 1993; Cope 1991; Ganascia, Ramalho & Rolland 1995a). On the musicological side, some studies investigate the existence and use of motives in particular corpora of musical pieces, with the aim of providing insights into the stylistic characteristics of a given creator or genre. An example of such motive-based, or motiveoriented, musicological study is Owens' study (1974) of the style of jazz saxophonist Charlie Parker. 2. Motive-Based Musicological Study In Owens' work, the corpus is made of 190 of Parker's solos transcribed from recordings. The investigation involves two interleaved tasks: 2.1 Motive Discovery The most important phase in the whole process, motive discovery consists in building a lexicon of prominent, recurrent motives from the corpus. Owens proposes a lexicon of about 200 motives which he claims are the ((building blocks ) of Parker's improvized playing. A multi-level classification for motives is provided, which we represent as a tree shown partially on Figure 1. 1A B 1C 1A ~ t1A 1A 1A Ah Aiil Ak aIb\BB d/ tAau 1Aav tAaw ICU Â~v Figure 1 - Partial Tree-Representation for Owens' Motive Lexicon One key aspect of motive discovery is that it involves a lot of subjectivity. Even when the various instances of a recurrent motive get diversely distorted (transpositions, rhythmic displacements, notes additions or omissions, etc.), they should still be considered instances of the same motive. 2.2 Statistical & Structural Analyses After building the motive lexicon, analyses are conducted to further put to the fore stylistical characteristics. Analyses investigate in particular statistical and structural aspects of motive organization in corpus' pieces. Owens gives global instance counts for the different motives across the corpus. Then those occurrence numbers are detailed according to pieces' tonality and harmonic scheme (e.g. Blues, or "I got Rhythm"-type changes). Also, structural analyses of a topological nature are made, providing motive frequency profiles in various key locations of pieces. 3. Toward Automation It has been remarked by several musicologists (e.g. Kernfeld 1989, p.558; Owens 1974, vol. 1, p. 271) that there have been only a few in-depth, detailed studies of jazz improvisers style such as Owens'. One of the reasons is that such studies represent a huge task Rolland & Ganascia 240 ICMC Proceedings 1996

Page  241 ï~~involving vast amounts of tedious, repetitive tasks such as annotating and counting motive instances. Our aim is to investigate the possibility to develop a system able to perform motive-oriented analyses such as Owens', with performances comparable to musicologists', and within minutes instead of years. If successful, applying our system to other jazz corpora would offer-in addition to a direct interest-the possibility to cast new, original light on the comparison of individual improvizing styles. We use the results of Owens' study to make a validation/verification on a particular corpus. Modelling/simulating motive discovery is a very difficult and interesting problem, because of-among other reasons-the need to take into account musicologist's subjectivity and the involved cognitive processes. Once motives have been determined, automatically performing statistical and structural analyses such as those described above, is a far easier problem. Thus, in the rest of this paper we will be focusing on motive discovery. 4. Motive Discovery The need for motive discovery appears in several domains besides music, such as biology or automated speech recognition. A review of the use of motive discovery in music appears in (Rowe 1993). Names for motive discovery vary, and we choose to use the term motive induction, as used by Rowe. In all cases, the data are made of sets of sequences, whose elements are e.g. nucleic bases or amino-acids in biology, signal samples in speech recognition, or notes or chords in music. Despite discrepancies in details between approaches, especially due to the introduction of different heuristics, a typical processing scheme can be drawn (see Figure 2). Motive induction is performed through the (possibly interleaved) succession of three phases. Sequence pair comparison (I) aims at finding similar portions (or subsequences) in two sequences, while multiple sequence comparison (II) aims at finding similar portions in n sequences (n>2). From the similar portions in the n sequences that make up the corpus, it is possible to induce motives (III), i.e., roughly speaking, subsequences that are sufficiently recurrent throughout the corpus. For each phase, various techniques have been proposed. In this paper, we will focus on the sequence pair comparison phase. SSequence Pair III Comparison --Multiple Sequence '- Motive induction i~aamteedAIo- Comparison corpus -> lexicon) Figure 2- Typical processing scheme in motive induction algorithms and systems 4.1 Sequence Pair Comparison Among techniques for comparing sequences pairs are dynamic programming (DP) techniques, which have been applied in several musical contexts (a brief review can be found in (Stammen and Pennycook 1993)). We are interested in local sequence comparison algorithms such as the one proposed by Kruskal & Sankoff (1983). Without going into all technical details, main characteristics of that algorithm can be stated as follows: " The similarity of two [sub]sequences is seen as their equality except for a ((small enough> set of transformations. Classical examples of transformations are insertions, deletions and replacements. For instance, let S1 and S2 denote quarter notes sequences {D4-F4-A4} and {D4 -G4}. S I can be changed into S2 by applying a deletion to A4 and then a substitution F4--G4. An algebraic value we call similarity contribution is associated to each transformation, very positive for the Â~ smoother)) transformations (e.g.: replacement of a note by a note with same pitch and close duration) and very negative for more ((drastic transformations (e.g.: deletion of a long note). " Very importantly, we establish a natural correspondence between transformations and distorsions mentioned in section 2.1. " It is possible to calculate a numerical value for the similarity between two sequences (or subsequences). The algorithm can find the subsequence pair(s) having the optimal similarity in sequences S (m elements) and S' (n elements), in time proportional to m x n. We are interested in finding out whether and how Kruskal & Sankoff's algorithm can be adapted to satisfactorily perform sequence pair comparison in view of the latter's integration in a musical motive discovery algorithm. In particular, we wish to determine what musical knowledge needs to be introduced in the algorithm and how it can be represented. In previous applications of DP to music diverse constraints, e.g. real-time functioning such as score following, made it absolutely necessary to minimize algorithmic complexity. As we are free from such constraints, we can refine our algorithms in any way that appears necessary. As a first step, we used only the classical transformations mentioned above, with the objective of assessing whether those were sufficient for a decent performance. 4.2 Implementation and Results implementation We have implemented our system using the Smalltalk object-oriented language. We use class set MusES (Pachet 1991) for representing a large part of basic musical concepts. Manuscript scores from the corpus are manually inputted as midifiles then converted into MusES objects using a converter we developed (Rolland 1995) The initial description of notes simply reflects the information in the midifiles: midipitch, start time, end time and amplitude. Then additional descriptions are computed by the system according to the varying needs, for instance pitchclasses, octave numbers, and ICMC Proceedings 1996 241 Rolland & Ganascia

Page  242 ï~~scale degrees. Similarity contribution functions take into account both pitch- and time-dimensions of notes involved in transformations. For instance, for the replacement of a Eb by an F in a Bb major passage, the contribution is calculated using the value of a specialized parameter that gives a sub-contribution for the replacement of a degree IV note by a degree V note. Time aspects, in a nutshell, are dealt with by computing the difference between the two notes' durations. Two global parameters also intervene, kl which controls the relative influences of pitch- and time- dimensions, and k2 which influences the size of similar portions. The principle underlying contribution functions, as well as the values of specialized parameters (about a dozen), are the same as those Mongeau & Sankoff (1990) used in a different musical context. Qualitative Results We conducted various (< qualitative experiments with our system using sequence pairs from Owens' study. Following are the conclusions drawn from the observation of the various comparisons' results. A large part of individual comparisons, when parameters are correctly adjusted, made perfect sense, as similar subsequences found perfectly match musical intuition. Others, on the contrary, showed limitations as, for instance, musically significant similarities were not detected by the algorithm. As steps toward solving that problem we have proposed to enrich the musical representations taken into account by transformations' contribution functions. For instance, in note descriptions we propose to add, among other attributes, the metrical position, the degree in local tonalities or in local shapes (II-V, II-V-I and so on), and the interval and interval direction computed from the previous note. All additional descriptions are automatically computed by the system. Associated with those transformation enhancements is the proposition of new transformations, so as to capture musically important aspects like instrumental fingerings or idiomatic traits characteristic of the musical genre under study (e.g. blue notes). Work on these refinements constitutes a central part of our research, but in this paper we will focus on another important aspect of applying and using a sequence comparison algorithm, viz. the problem of pertinently adjusting its parameters 5. Algorithm Parameter Optimization Adjusting values of the algorithm's parameters, especially global ones, modifies the obtained results and their musical pertinence drastically, through a complex process. Even if the details of algorithms of Tasks fl & III (see Figure 2) have not fixed yet, it is necessary to determine globally satisfactory parameter values for the algorithm of task I. In fact; Tasks II & III on Figure 2 are also typical examples of tasks that involve parametered algorithms. If we wanted to adjust simultaneously parameters of all algorithms at once, i.e. several dozens of parameters, huge combinatorics would make the problem inextricable. A qualitative approach, consisting of adjusting parameters to correct the problems encountered in the results of individual comparison examples is impossible as it requires to simultaneously examine hundreds or thousands of examples. This is why we have chosen a different approach, described hereunder. 5.1 Principles Trees & Similarity Schemes In order to present our optimization approach, we need to make the following observation concerning the relationships that can be established between the notion of tree-based classification and that of similarity scheme which we will introduce. From a tree classification, such as Owens', one can compute a qualitative similarity scheme between elements contained in leaves: the similarity between the elements contained in two leaves is computed as a function of the leaves' proximity in the tree. For instance, in Owens' tree (Figure 1), motives 1 Aau and 1 Aav will be considered qualitatively more similar than e.g. motives 1 Aau and IAf. The latter two, in turn, will be considered more similar than; e.g. IAau and ICv. Those, in turn, will be considered more similar than e.g. I Au and 6lB. A reciprocal, more complex, computation involves the generation of a tree from a quantitative similarity scheme, i.e. from a table of numerical similarity measurements between all possible pairs drawn from a fixed set of elements. The generated tree's leaves contain this set of elements. In our case the fixed set is Owens' lexicon, and for each value couple {kl,k2 } a similarity scheme can be obtained using the corresponding sequence pair comparison algorithm. Although the latter algorithm is chiefly intended to compare musical pieces from the corpus, it can obviously be used also to compare motives. Figure 3 shows an example of a similarity scheme; each number in the table is a similarity measure between a particular pair of motives. Principle of Our Approach Let us suppose that we had developed a motive induction algorithm, based on the diagram of Figure 2, that yielded a motive lexicon close to Owens'. Using the sequence pair comparison algorithm, we could generate the similarity scheme for Owens' motive set. One would expect to see a good match between that similarity scheme obtained and Owens' tree. That observation is the base of our approach Â~ to assess the adequacy of any particular couple of parameters values { ki,k2 }, we assess the adequacy of the corresponding sequence pair comparison algorithm. Using the above explained methods, algorithm adequacy assessment can be performed by (1) comparing Owens' tree with the tree generated from the comparison algorithm, or (2) comparing the similarity scheme computed by the latter algorithm with the qualitative similarity scheme generated from Owens' tree. We have chosen this econd approach, as it is less problematic to implement. Rolland & Ganascia 242 ICMC Proceedings 1996

Page  243 ï~~5.2 Implementation We have defined and implemented an integer function A(k 1,k2) (which we call parameter adequacy assessment function), that gives an evaluation of the overall matching between the similarity scheme and Owens' tree. That evaluation is, roughly speaking, performed through a process of counting the number of motives that cause individual mismatches. For each value couple { kl,k2 }, the adequacy assessment is a two step process: (1) a similarity scheme such as the one depicted on Figure 3; is computed (by symmetry, numbers below the diagonal need not be calculated); and (2) the value of a parameter adequacy assessment function A(kl,k2) is calculated. I - I I I 1Aau IAav 1IAaw 64 1Aau 6.8 1.6 3 1.6 lAav 18.6 0 4.4 1Aaw 11.4 2.3 64 34.3 Figure 3-Quantitative similarity scheme: all motive pairs 5.3 Results Figure 4 shows an automatically calculated plot of A(kl,k2) for values of k I and k2 comprised between 10-6 and 106. One can notice a sharp ridge of maxima, whose projection on the (k l,k2) plane can be approximated by linear equation k2 = (0.2)kl. For any fixed value of k I, maxima are in fact global maxima, which can be evidenced by plotting sections such as the one shown on Figure 5. Maxima correspond to values of k I and k2 that are most adequate, i.e. those which make our sequence pair comparison algorithm most musically adequate to Owens' analysis and results. values for k l and k2-more precisely a set of {k l, k2) couples-to use in the sequence pair comparison algorithm in view of the latter's integration inside the motive induction scheme. Additional Benefits Although the count-based evaluation mentioned above could not strictly be considered to provide an absolute, consensual evaluation of a sequence pair evaluation algorithm, it provides us with some kind of ((benchmark > evaluation we can use at each refinement we make, in particular the introduction of new transformations. This emphasises the interest of having introduced a function A(kl,k2) based exclusively on a counting of misplaced elements. Perspectives In section 3 we have presented some middle-term perspectives. This work also opens perspectives in motive-based recognition of style and/or author, with applications in automated indexation of musical databases and possibly in the domain of copyright. Presently, we focus on further refining the sequence pair comparison algorithm, especially (see section 4.2) through the introduction of new musical descriptions and transformations. k2 1000 10 o}1000) (10000) ( V1000000) 200 210 230 240 2b0 Figure 5-Vertical section for k1 =100 and k2 = 10-6 to 106 7. References Cope, D. 1991. Computers and Musical Style. Madison: A-R Editions. Ganascia, J.G., Ramalho, G. and Rolland, P.Y., 1995a. An Artificially Intelligent Jazz Performer. Proc. 1995 International Symposium on Cybernetic Paradigms of Musical and Theatrical Performance Kernfeld, B. (ed.) 1989. The new Grove Dictionary Of Jazz. Grove pub. Co. Kruskal, J. & Sankoff, D. 1983. An Anthology of Algorithms and Concepts for Sequence Comparison. 293-296. In Sankoff & Kruskal, eds:Time Warps, String Edits and Macromolecules. Addison Wesley. Mongeau, M. and Sankoff, D. 1990. Comparison of musical sequences. Computer and the humanities, 24. Owens, T. 1974. C. Parker: Techniques of improvization. PhD thesis, UCLA Music Dept. 900p. Pachet, F. 1991. Representing the Knowledge Used by Jazz Musicians. ICMC '91, Montreal Rolland, P.Y. 1995. SMF2MusES Converter User's Manual. Rowe, R. 1993. Interctive Music Systems. MIT Press. Stammen, D. and B. Pennycook. 1993. Real-time recognition of melodic fragments using the dynamic timewarp algorithm. Proceedings ICMC'93. 300 -y T----r P Figure 4- Plot ofparameter adequacy assesment function A(kl,k2) for kl and k2 varying from 10-6 to 106 6. Discussion and Perspectives Our optimisation work has met the objectives presented in section 5, in providing us with a range of ICMC Proceedings 1996 243 Rolland & Ganascia