Page  00000425 AUTOMATIC THOROUGH-BASS REALIZATION IN BAROQUE MUSIC Masahiro Niitsuma Hiroaki Saito Department of Computer Science Keio University niizuma@nak.ics.keio.ac.jp ABSTRACT In baroque music, composers wrote only the notes of the bass part with figures to indicate the chords to be played. This figured bass is called thorough-bass. The act of playing the accompaniment from thorough-bass is called thoroughbass realization. Thorough-bass realization is a form of improvisation which has many possible variations. This paper presents a method for thorough-bass realization in baroque music, considering musical tastes. We define "harmony cost" which indicates likelihood of chords, then, present a method for automatic thorough-bass realization by beam-search dynamic programing using the harmony cost. Experimental results clearly show effectiveness of our approach and even similarity to human realization. 1. INTRODUCTION In the era of baroque music, composers wrote the melody and the basso part only. Specific numerical figures were attached in the basso, and performers played proper chords from such scores. The basso with figures of this accompaniment part is called thorough-bass. Figure 1 (a) shows the accompaniment part of Brandenburg concerto No.5 by Bach. In Figure l(a) no sound of the right hand excluding the first chord is written. A small Arabic numeral was added in the part of left hand. Accompanist at that time played proper chords from this figured bass which matched to other string players' part. An almost constant rule existed in how to read figured-bass. Therefore, accompanists were able to understand what chords should be played from figured bass, and how to locate the chord depended on entirely the accompanists' device. Figure 1(b) is one example of realization of Figurel 1(a). However, it is difficult to realize thorough-bass like Figure 1(a) properly for those who don't specialize in baroque music, especially for amateurs, because knowledge of harmony or historical background is necessary. In earlier research, probationary rules were set, then the patterns that did not violate the rules were searched for[5, 6]. However, there are no absolute rules in real music, and rules can be violated in some cases. Moreover, they didn't take into account of figures, and it was impossible to realize thorough-bass in real music. This paper presents a method for automatic thoroughbass realization based on "harmony cost", which indicates EI la- I_ ll a lll.*~ C j B E.....::::::::r *:::::::"---:::i:::: ~1it~::E::::::'::::::::::~~~~~~~~~~:::, ~:::*:::::::'i# _ _ __:i:::::::"":"""'":""':"i i aI (a) S^^^^^*.............. ^.......;.................... A....................... (b) Figure 1. score (b). An example of original score (a) and realized the likelihood of chords, and beam-search dynamic programing using the harmony cost. 2. AN AUTOMATIC THOROUGH-BASS REALIZATION SYSTEM Here we explain how our system realizes thorough-bass. To simplify the process, the following basic assumptions are made. 1. Thorough-bass is realized into four-part. 2. Only harmonic tones are produced unless the figure indicates non harmonic tones. 3. No voice is embellished. Figure 2 shows the process flow of our system. First the figure and the basso of the thorough bass are taken (input). Secondly, the input figure is interpreted, and three figures are hypothesized (interpretation). Thirdly, all the possible chords that can be located are stored from the basso and the figures (chord location). Fourthly, the best route is searched by dynamic programing (DP). Finally, the complete music is produced in MIDI format and a musical score (output). 2.1. Figure interpretation Three figures are necessary to realize thorough-bass into the four-part chord. Therefore, figures are supplemented when the given figures are less than three. Because there 425

Page  00000426 tart locatlngthe |: li '^;7;:u possible chord | ~ ss:,----- ------- ý searching the best answer by DP output II ) t 9! *; and.................... S(a) (a) 9D J (b) Figure 3. Chord location cost(a < b)...... v g i 3.1. Local cost Local cost L(xt) indicates the likelihood of a certain chord xt e Xt at time t. L(xt) consists of two different costs; figure interpretation cost L1(xt) and chord location cost L2(xt)................ --------- ------------... -- - -- - - - - -- - -- - - -- ---------- ---------------------- L(xt) = Ll(xt) + L2(Xt) (1) Figure 2. Flowchart of our method. are a certain number of rules in this supplementation method, we have extracted 46 rules (Tablel) from textbooks [1, 7, 2]. 2.2. Chord allocation In this part, the figures interpreted by the figure interpretation module are received, and the possible chords in which all voices are set in proper range are stored. How to choose an appropriate chord sequence is described in the next section. 3. FINDING THE MOST APPROPRIATE CHORD SEQUENCE The optimal sequence of chords is found by DP [4]. With DP, we search for the route with minimum cost. We adopt two kinds of cost; the local cost and the transition cost. Here we define a notation: a set of chords Xt represents all possible chords located at time t. Table 1. Figure interpretation rules (excerpts) figure interpretation none 358 6 366 6 336 6 368 6 346 7 357 24 246 25 255 Figure interpretation cost L1(xt) represents the likelihood of a certain interpretation of figure. Some figures can be interpreted differently depending on composers and regions. For instance, the figure of 6 is usually interpreted as the first inversion chord, and is supplemented as 3 3 6, 3 6 6 or 3 6 8. However, some theorists and composers like Telemann, called the figure of 6 a petite accord and supplemented as 3 4 6 [3, 7]. We can reflect this preference by lowering the cost of the interpretation of 6 as 3 4 6 than other interpretations. Thus, we can generate different kinds of accompaniment by changing the figure interpretation cost. Next, chord location cost L2(xt) indicates the likelihood of a certain chord xt at time t. For instance, the cost of a close chord (figure3(a)) is smaller than that of an open chord (figure3(b)), for a close chord is more common than an open chord if there is no specific reason. Table2 lists some of the factors for chord location cost. 3.2. Transition Cost Transition cost T(xt, xt+1) indicates the likelihood of the connection between two chords when there are a certain chordxt at time t and chord xt+l at time t + 1. For instance, Figure 4(a) has successive octave between soprano and tenor, therefore the transition cost of Figure 4(a) is larger than that of Figure 4(b). Table3 lists some of the factors for transition cost. Table 2. Example factors for chord location cost. N: Negative rule, P: Positive rule. Factor N/P Each voice is not set in a proper range N Leading note is doubled N Close position P Not prepared seventh N Not prepared ninth N 426

Page  00000427 *...! 1 l| 1 *ii7 i: *::::::n:::::::::::: i....................^.............. ^.......... (a) (b) Figure 4. Transition cost(a > b). 3.3. Determining cost It is necessary to assign the weight of the factor of each cost. It would be ideal to decide the cost by some learning method automatically. However, it is difficult at this point to get a large amount of training data of realization. Moreover, because thorough-bass realization varies from one composer to another, it would not be good to calculate the general weight. Therefore, we assign the cost by humans by trial and error. 3.4. Search by DP In standard DP, accumulated cost is memorized at each state and then the route is traced back to obtain the best state sequence. If this method is used in thorough-bass realization, the amount of memory needed becomes O(e") as the length of music (n) increases. Thus we adopt the beam search algorithm which keeps states with small cost only [8]. Finally we define "harmony cost" P(xt) as the sum of local cost L(xt) and transition cost T(xt, x+l1). pared as MIDI files, where all files have the same volume and the same tone color. * Bass-Part only (BPO) * Four-Part by our system (FPOS) * Four-Part by a commercial system (FPCS) * Four-Part by a professional musician (FPPM) The four players are familiar with music from infancy, and have good command of the instrument(recorder). To evaluate three roles of the accompaniment, they were asked to evaluate the following criteria and rank it between 1 -5 (poor-excellent). * Can you feel harmony?(Harmony) * Can you feel rhythm?(Rhythm) * Does melody sound better?(Melody) The experiment platform was Mac OS X, 2.16GHz Intel Core Duo processor with 2GB memory. To lead impartial judgment, the performers didn't know with which accompaniment they were playing. Figure 5 shows the average score for all pieces, and Figure 6 shows the score difference between accompaniment by our system (FPOS) and by a professional musician (FPPM). "BPO" + "FPPM" *..44F P0 P(xt):=L(xt) + T(xt+) (2) 4. EXPERIMENT 4.1. The Method of Experiment Harmony Rhythm Criteria Melody We conducted an experiment to evaluate the effectiveness of our method. In the experiment, four human soloists played four different pieces with four different accompaniment. Table4 shows the pieces used in the experiment. Four accompaniments of each piece (Table4) were preTable 3. Example factors for transition cost. Factor N/P Parallel octave N Parallel unison N Successive fifth N Successive octave N Successive unison N Contrary motion with other voices P Leap larger than octave N Seventh interval motion N Augmented interval motion N Figure 5. Average score for four each accompaniments. 4.2. Harmony Figure 5 illustrates that evaluation of FPOS is higher than commercial systems(FPCS), only basso (BPO), and almost the same as FPPM. Here we focus on FPOS and FPPM, Figure 6 illustrates that the score of FPOS is almost the same as FPPM other than Purcell. An examinee Table 4. Pieces used for experiment Title Key Bar number D. Purcell Sonata F dur 52 Telemann Sonata d moll 17 Marcello Sonata F dur 38 Barsanti Sonata g moll 38 427

Page  00000428 5. CONCLUSION AND FUTURE WORK "Purcell" "Teleman" "Marcello" "Barsanti" - \ This paper presented a method for automatic thoroughbass realization. Experimental results clearly show effectiveness of our approach and similarity to human realization. As for future work, the realization with arpeggio remains one of the issues to be pursued. Furthermore, realization of thorough-bass with defective figures is a far more complicated problem and needs further study. We intend to apply the method presented here to automatic improvisation and automatic composition. Acknowledgement This research was conducted under the auspices of the untrodden youth software business in the latter six months of fiscal year 2006. Harmony Rhythm Criteria Melody Figure 6. Difference between the score of FPOS and that of FPPM. 6. REFERENCES (a) (b) Figure 7. Difference between our system (a) and professional(b) in Purcell. expressed that the harmony was sometimes uncomfortable for the accompaniment of FPOS in the experiment of Purcell. Figure 7(a) shows the part of harmony discomfort, alto progresses with B H B. Because this part belongs to A minor, B sounds uncomfortable relative to the solo part of A minor. This problem occurred because the input figure itself lacked necessary ý. 4.3. Rhythm and Melody Figure 5 illustrates that the evaluation of FPOS is higher than FPCS and BPO, and is almost the same as FPPM. Here we focus on FPOS and FPPM; Figure 6 illustrates that the evaluation of FPOS is the same as FPPM other than Purcell. As for the piece of Purcell, because the harmonic changes are few, chords were played with arpeggio in FPPM as shown in Figure 7(b). An examinee expressed that he was impressed by chords played with arpeggio for the accompaniment of FPPM in the experiment of Purcell. On the other hand, chords were merely played at the same time in FPOS as shown, and there was an opinion that he felt the chords being very hard for the accompaniment of FPOS in the experiment of Purcell. This indicates that the sustaining one chord with the same harmony can become hard and tedious. [1] Jasper Boje Christensen. 18th century continuo playing a historical guide to the basics. Barenreiter, 2002. [2] Handel. Continuo Playing According to Handel. Oxford University Press, 1990. [3] Johan David Heinchen. Thorough-Bass Accompaniment according to Johan David Heinchen. Nebrask, 1966. [4] Xuedong Huang, Alex Acero, and Hsiao-Wuen Hon. Spoken Language Processing: A Guide to Theory, Algorithm, and System Development. Prentice Hall, 2001. [5] Masanobu Miura, Tohru Simoishizawa, Yumi Saiki, and Masuzo Yanagida. Evaluation of basse donnee system for the theory of harmony. The Trans. of the institute of electronics, information and communication engineers(in Japanese, 54(6):936-945, 2001. [6] Masanobu Miura, Masashi Yamada, and Masuzo Yamagoda. Realizability of a music aesthetics evaluation stystem for allowable solutions of given bass tasks. In 8th International Conference on Music Perception and Cognition, pages 538-541, 8 2004. Chicago,USA. [7] Saint-Lambert. Nouveau traite de l'accompagnement de clavecin, de l'orge, et des autres instruments. Paris:Christophe Ballard, 1707. [8] Ney H Tillmann C. Word reordering and a dynamic programming beam search algorithm for statistical machine translation. Computational Linguistics, 29(1):97-133, 2003. 428