<<

A COMPUTER-BASED IMPLEMENTATION OF RULES FOR FIGURED REALIZATIONS

Adam Wead Ian Knopke

Jacobs School of Music Informatics Indiana University Indiana University [email protected] [email protected]

ABSTRACT would be extremely desirable (from the point of view of the performer) to explore other ways to compare the origi- This paper documents an expert system for visually dis- nal source in an automated or partially-automated fashion. playing differing rule sets for producing figured bass parts Of special interest is the places where the various treatises, from a given, unfigured continuo part. The system is based often from entirely different geographical regions, differ on a decision tree procedure that is built from rules that as to performance instructions. To date, this has not been have been interpreted and broken down into a set of at- attempted in any technologically-assisted manner. tributes, with output classifications resulting in harmoniza- tions. Besides the visual and explanatory appeal, it can The project documented here explores an alternate, computer- also be used to generate new and has the based method for answering these questions. We envi- potential to serve as a basis for a historically-accurate ac- sions several applications for it. First, it provides a way companiment system. to visually compare multiple sets of historical rules for harmonizing bass lines, a task that is difficult to do from 1. INTRODUCTION the original texts alone. Also, the rule sets and derived decision tree can be used to automatically generate new, Creating harmonizations from partially-figured or unfig- historically-accurate figured bass parts for given bass pas- ured continuo parts is an art form in itself, and is a nec- sages, and has the potential to be used in a live situation essary part of early music performance, as well as a stan- as the basis for an system. dard topic in musicological research. One way perform- ers learn these skills is through practical experience or di- rectly from a teacher. However, those concerned with true historical accuracy in performance often turn to the orig- inal treatises that were published during the seventeenth 2. RELATED WORK and eighteenth centuries. Most of these are available in facsimile and have been translated, allowing the interested Basso continuo and its related performance aspects have performer or scholar to directly study the historical exam- been studied for decades by musicologists and music his- ples. This is not, however, a task to be taken lightly. Each torians. Some studies focus on specific performance as- of these treatises must be studied individually, and it is up pects [5], while others look at a large cross-section of mu- to the performer to distill the different rules and concepts sic from the period [18]. Perhaps the most comprehensive from each treatise, to create a comprehensive understand- body of work is that by F. T. Arnold [1]. Of all these ing that he or she would employ in the realization of a studies, this is the only one that attempts to provide an particular continuo bass. over-arching view of basso continuo practice as a whole. Some scholars have attempted to simplify this process However, it should be kept in mind that Arnold presents a through their own interpretations. Current studies of basso composite picture that he has devised and does not always continuo practice either adopt a theoretical view, or a per- draw a clear distinction as to how individual treatises dif- formance practice view. Although the two are not mutu- fer on certain practices. ally exclusive, the intended audience for such studies is either scholars in the fields of music theory or musicol- Methods for automatically generating harmonizations ogy, or a group of performers and teachers. The scholarly have also been actively studied. Some are more general view tends to focus more on the role continuo played in studies [13, 17], but most are concerned with specific styles the historic development of western music and its related such as the music of J. S. Bach [9, 10, 6, 8] or har- theories, while the practical view examines how one may monizations [15]. Some excellent work has been done on learn the methods of continuo realization and use them real-time accompaniment systems [3, 4, 2]. A good intro- in the performance of works which require an extempo- duction to the basic concepts is that provided by Robert rized harmonic realization of a basso continuo part. It Rowe [14].

188 3. METHODOLOGY Perhaps most importantly, some treatises do not contain complete sets of rules, but were instead intended to pro- One of the goals of this project is to create a coherent, vide details for improving the playing of performers who, historically-accurate rule set for determining the proper at the time, would have already had a basic understanding figured bass for a given bass line. The rule set should of accompaniment rules. The missing details need to be adhere to the constraints of various treatises, and should filled in. be able to accommodate contradictions and differences in Two treatises were chosen to form the source for our the recommended harmonizations that are recommended. initial data: a French treatise by Denis Delair published The classic machine-learning approach to solving a prob- in 1724 [11], and an Italian treatise by Francesco Gas- lem of this sort is to train a classifier on a data set and parini published in 1708 [7]. In addition to the close prox- “learn” the rules directly from the data [12]. This would imity of their publication dates, there were other reasons require a large collection of bass lines with complete sets for choosing these two treatises. First, both contained of figured bass already written in. We have not been able fairly logical, straightforward rules expressed in a similar to locate such a data set. Unfortunately, most music col- way. Secondly, both treatises contained simple instruc- lections from this time period are only partially figured, tions intended for beginners that could be used to con- which would leave us with the difficult problem of fill- struct a foundation of principles on which more compli- ing in or “guessing” at how to complete all of the missing cated rules could be constructed later. Also, both treatises parts. Some collections are more complete, but do not ex- use the motion and direction of the bass line as one of the ist in computer form. While these could be entered in a main factors for applying figures to bass notes that have format such as Humdrum, creating a large enough data set no existing figures in them. is not trivial. We began with a single chapter from a treatise on ac- Another problem is one of authority. In this case, the companiment by Denis Delair that contained an introduc- treatises are the “experts” that beginning players learn tory chapter on the basic application of figures to a bass at least part of their craft from. Most machine learning line. After some experimentation, it was determined that classifiers are concerned with producing the correct clas- each rule could be adequately explained using a set of sification based on the learned data set. Some pattern clas- approximately sixteen “questions” that could be asked of sifiers, such as neural nets, present major difficulties in un- each to determine the correct figure that should derstanding how a particular classification, or in this case be applied. Each question can be represented by a single was arrived at. In fact, we see this as a ma- attribute in the form of a table. Some of the attributes in jor difference between the fields of Music Information Re- our table are: trieval and Music Theory. With MIR systems, the empha- sis is primarily on getting the correct answers, while the- Any figure already present with the bass note • orists and performers are often more concerned with the The scale degree of the bass note methodology that is used to produce the result. Addition- • ally, we would like to be able to provide a compact rep- Any accidentals present resentation of the rules, including comparisons between • The function of the note, ie. part of a , in a rules derived from different treatises, so a performer or • theorist can more easily understand them and their place suspension within the entire practice, and perhaps serve as a guide to The intervallic direction of the bass line before and understanding the entire set of rules. • after the note in question With these considerations, it seemed natural to instead consider an expert system derived primarily from the rules The direction and scale degrees of the notes before in the treatises themselves. However, this approach has its • and after the note in question own complications. While the treatises certainly contain rules, these are not quite in a form that is ready to be used Each treatise rule was then carefully interpreted and ex- directly by a computer. pressed in terms of the above attributes, along with the For instance, consider the following quotation: proper harmonic outcome. Most rules produced a single outcome, but in some cases a single treatise example re- And when the composition calls for a sixth, sulted in several different rules. either directly or through resolution, together We then used these rules as input to build a decision with the said major third, then the following tree. The tree algorithm used here is a fairly standard ID3 note may have a fifth, and sometimes the fifth model, with basic pruning of spurious results, similar to followed by a sixth. that described in the literature [12, 16]. Starting from the node and assigning the correct value to each of the It may not be immediately clear to the reader that this attributes is functionally equivalent to one of the treatise procedure is intended to produce a chord rules, and produces the proper figured bass symbol. At above the bass. present, our tree contains approximately 150 nodes, with Also, treatise rules are not necessarily presented in log- a maximum depth of eight. This indicates that not every ical orderings and may contain differences in language. attribute is needed in every situation to determine a proper

189 , and no single harmonization requires the com- dicts itself. However, this has not happened yet. Certainly plete set of attributes (although they are provided). While the different treatises differ as to how to resolve certain the entire tree is too large to be meaningfully reproduced situations, but our rule set includes a treatise attribute that here, an example of one branch is given in Figure 1. prevents completely opposing rules. The final decision tree is extremely useful for provid- ing a visual way to interpret the result sets of each trea- tise. It also presents this information in a way that can be easily understood by others working in areas of mu- sic theory that may not be familiar with the intricacies of the technology involved. However, it can also be used to produce a new figured bass realization for an unfigured or partially-figured bass line. A worked-out example using the decision tree for a Corelli fragment is shown in Figure 2. The upper harmonization is Corelli’s original, while the second line is a Gasparini/Delair composite, and the bot- tom harmonization uses only Delair’s rules. It is intended that the procedure be automated, and eventually be used to produce historically-accurate harmonic realizations for an accompaniment system.

Violin 1  6 ÀC     Violin 2 ÀC ¥ ‹ & & & & & & & & 6 & & & & & & & ¥ ¥  C À Organo  À  &   ¦ C & 5 4 6 2 5 5 6 3 3 3  & & & 6 C   ,& & F Figure 1. Decision Tree Example & & & & & & & & & & & & ,& & & & & & & & & œ & & 6 C & , & & & & & & & ¥ ¥ It should be noted that our use of decision trees is some-  C  what unorthodox. Traditionally, each data instance used    & & & for training would result in one of a small, discrete num- ¦ C &  5 ber of classifications. By learning from a large number of , 5 4 , 6 5 instances, the tree algorithm is able to overcome errors in 3 6 7 5 the data and other difficulties that arise in machine learn- 4 5 3 ing. In this case, data instances are replaced with rules, and most rules produce a unique harmonic result. This is equivalent to having a different classification category for Figure 2. Corelli Harmonization, and two new realiza- each data instance, and has several non-standard effects. tions Our tree has a large number of leaf nodes, each express- ing a different harmonic outcome, although the entropy algorithm tends to produce fairly compact trees in most 4. FUTURE WORK situations. Another unusual effect is that the entire tree is remapped with the addition of new rules, and the order At present, approximately half of the rules from the two of nodes can change. This does not affect the decision- treatises have been incorporated into our rule set. While making capacity of the tree, but can be somewhat surpris- this forms a complete system and passably handles all ing in the choice of where to split nodes and the order in possible harmonic situations, some of the choices can be which they occur, especially with regards to the root node. somewhat bland. Many of the more advanced rules that Also, in a normal situation the tree algorithm is able to we have not included provide more interesting musical accommodate conflicts by going with the most common choices. There are also several additional treatises that result in each situation. This doesn’t work in the one-to- we are working to incorporate into our framework. We one situation that occurs here frequently, and we will have are working to incorporate as many of these as possible difficulties if we ever come across a treatise that contra- into our framework.

190 We would like to use the basic decision making ca- In Proceedings of the International Computer Music pacity of the system as the basis for a more complete Conference, pages 243–9, 1988. accompaniment system that could automatically generate historically-accurate for a solo instrument, [5] Laurence Dreyfus. Bach’s continuo group: players based on a partial or even a completely unfigured bass and practices in his vocal works, volume 3 of Studies line. The primary difficulty here is that figured bass gives in the . Harvard University Press, a good explanation of the harmonic elements that must be Cambridge, MA, USA, 1987. sounded at a given point, but provides less guidance with [6] K. Ebcioglu.˘ An expert system for harmonizing regards to actual between harmonic entities. in the style of j. s. bach. Understanding Mu- A basic voice leading system of some sort will need to sic with AI: Perspectives on Music Cognition, pages be implemented to take this from the generation of sym- 294–334, 1992. bols to actual sound. We are currently experimenting with methods to do this, and initial attempts involving simple [7] Francesco Gasparini. The Practical Harmonist at rules such as carrying over common tones and avoiding the . Yale University Press, New Haven, parallels look promising. CT, USA, 1968. One of the initial goals of this project was to be able to display complete rule sets in a compact form that can [8] H. Hild, J. Feulner, and W. Menzel. HARMONET: be easily interpreted, as well as allowing comparisons be- A neural net for harmonizing chorales in the style of tween treatises. Our decision-tree based approach accom- J. S. Bach. Advances in Neural Information Process- plishes this. However, these trees have a tendency to grow ing, 1991(4):267–74, 1991. in such a manner as to be difficult to visualize with nor- [9] D. Hornel.¨ A multi-scale neural network model for mal paper sizes, and reductions in size make it too diffi- learning and reproducing variations. Com- cult to read. It seems natural at this point to instead use a puting in Musicology, (12):141–57, 1998. computer-based representation such as a web page, where the virtual boundaries can be expanded infinitely, perhaps [10] D. Hornel¨ and T. Ragg. Learning musical structure onto multiple hyperlinked pages. This also has the pos- and style by recognition, prediction and evolution. sibility to include additional information that is difficult In Proceedings of the International Computer Music to fit into a single graph. The final product will proba- Conference, pages 59–62, 1996. bly include the possibility of clicking on a particular leaf node to bring up a popup box containing various pieces of [11] Charlotte Mattax. Accompaniment on and metadata, including the original rule quotation that led to Harpsichord: Denis Delair’s Treatise of 1690. Indi- a particular leaf. ana University Press, Bloomington, IN, USA, 1991. [12] T. M. Mitchell. Machine Learning. McGraw-Hill, 5. ACKNOWLEDGEMENTS New York, 1997.

The authors would like to thank professor Eric Isaacson [13] M. C. Mozer. Neural network music composition by of the Jacobs School of Music, Indiana University, and prediction. Connection Science, 3(6):247–80, 1994. Frauke Jergensen of the University of California, Davis, [14] R. Rowe. Interactive Music Systems. MIT Press, for their assistance with this project. Cambridge, 1993.

6. REFERENCES [15] P. Toiviainen. Modeling the target-note technique of bebop-style jazz. Music Perception, 12(4):399–413, [1] Franck Thomas Arnold. The art of accompani- 1995. ment from a thorough-bass, as practised in the XVI- [16] I. H. Witten and E. Frank. Data Mining: Practical Ith & XVIIIth centuries. American Musicologi- Machine Learning Tools and Techniques. Morgan cal Society-Music Library Association reprint series. Kaufmann, San Francisco, second edition, 2005. Dover Publications, New York, NY, USA, 1965. [17] I. H. Witten, L. C. Manzara, and D. Conklin. Com- [2] B. Baird. The artificially intelligent computer per- paring human and computational models of music former and parallel processing. In Proceedings of the prediction. Computer Music Journal, 18(1):70–80, International Computer Music Conference, pages 1994. 340–3, 1991. [18] Robert Zappulla. accompaniment in [3] R. Dannenberg. An on-line algorithm for real-time France, volume 6 of Speculum musicae. Brepols, accompaniment. In Proceedings of the International Turnhout, Belgium, 2000. Computer Music Conference, pages 193–8, 1985.

[4] R. Dannenberg and H. Mukaino. New techniques for enhanced quality of computer accompaniment.

191