Page  50 ï~~Counterpoint Assistant David Evan Jones University of California Santa Cruz, Department of Music Santa Cruz, CA 95064. email: DEJ@CATS.UCSC.EDU ABSTRACT Counterpoint Assistant (CPA) is a composer's-assistant program written in Allegro Common LISP and running on the Apple Macintosh. It is designed to allow contemporary composers a maximum of control in creating complex multi-voice contrapuntal textures while assigning to the computer most of the calculation usually associated with rigorously controlled counterpoint. Users begin by composing ("by hand") a two-part counterpoint in any style and entering it into the program. Counterpoint Assistant will compute all possible realizations of a multi-voice contrapuntal texture (up to twelve voices total) strictly according to user-defined "palettes" of allowable melodic lines and harmonies. 1. INTRODUCTION Every pitch in rigorous common-practice tonal counterpoint (a Bach Fugue, for example) is subject to definable constraints in a matrix of (at least) two dimensions -- the melodic and the harmonic. In a strict canon, for example, each pitch forms a part of a thematic pattern that recurs elsewhere in the texture, while that same pitch functions to further (or to embellish) a quasi-independent series of harmonies. Twentieth-century composers such as Bela Bartok, Igor Stravinksy, and many others have also constructed counterpoints according to their own very different, but equally rigorous, melodic and harmonic constraints. Schoenberg, Webern, and others strove, at times, for a "unification of musical space" (Schoenberg's term) by using the same materials in constructing both the melodic and the harmonic dimensions. Counterpoint Assistant is a composer's-assistant program written in Allegro Common LISP and running on the Apple Macintosh II with at least 4MB RAM. CPA allows a user automatically to add up to ten voices to any pre-composed two-part counterpoint strictly according to userdefined "palettes" of allowable melodic lines and harmonies. The program does not implement protocols (specifying, for example, which chord may follow another) but simply delivers to the user all possible solutions given the pre-composed two-part counterpoint, the specified number of voices, and the allowable lines and harmonies, and other factors mentioned below. 2. USING THE PROGRAM The user begins by composing and entering a two-part counterpoint at the MIDI keyboard. This counterpoint must be constructed using multiples of a single pulse (additive rhythms). Rests at the beginning and end of the counterpoint are allowed, but rests in the middle of the theme are not currently accommodated (repeated or tied notes can substitute). The user then plays at the keyboard or calls a predefined "melodic palette" (a set of allowable melodic lines represented in intervals-- not interval classes). In a strict canon (the default setting in CPA), the allowable lines in the "melodic palette" are intervallically identical to or strict permutations of the original lines entered at the keyboard, but the user may specify any combination of allowable lines s/he wishes. 50

Page  51 ï~~The user also specifies a "harmonic palette" (a set of allowable chords) by playing these chords at the keyboard or by calling them from a pre-defined database. These chords are treated by the program as a group of pitch-class sets which are allowable in the counterpoint in any transposition and in any chord inversion (not in mirror-inversion). Any pc-set (up to all twelve pitches) can be entered in the harmonic palette. Lastly, the user: 1. Specifies the number of voices (up to twelve) desired in the final,texture, 2. Indicates whether the two voices played at the keyboard are to be treated as inner voices or outer voices, and... 3. Specifies the number of notes to be "offset", that is, the number of pulses possible between the entrance of the first voice of the final texture and the entrance of the last voice of the final texture. Incorporating the two voices played at the keyboard, CPA computes all of the possible realizations of a contrapuntal texture with the indicated number of voices where every note in the texture is both a constituent of one of the allowable melodic lines in the melodic palette and also a member of one of the allowable chords in the harmonic palette. Sometimes hundreds of realizations are possible; sometimes zero are possible. The number of realizations depends upon several factors, including the number of possible chords, the number of possible melodic lines, the intervals between the given voices, the ambitus between the given voices (if they are to be treated as outer voices), etc. The user may then play back the realizations individually, loop and transpose them in various ways, and select which s/he will retain. 3. COMPOSING "AT A DISTANCE" FROM THE MATERIALS Young composers are traditionally admonished not to compose at the keyboard. The keyboard, it is said, may limit the composer's conception to the reach and habits of the fingers. By analogue, an argument could be made that note=by-note intuitive composing (even away from the keyboard) may limit the composer's conception to the reach and habits of the ear -- to the composer's recurring associations. Counterpoint Assistant is the initial module of a planned complex of composer-assistant programs all written to allow the composer to exert complete control over the music, but from a "distance" (from a level of abstraction) that produces: "Results which the composer could and would have produced by hand had s/he taken the time to do so, and... * Results that are correct but unpredicted realizations of the given constraints. In using composer's assistant programs such as CPA, composers would design their constraints to produce the former results, but allow the latter results to challenge and expand their original conception. These two types of results are, of course, the apparent aim of compositional systems produced by composers as diverse as Boulez, Cage, Stockhausen, Xenakis, Steve Reich and many others. Approaches vary most widely, however, in the level(s) at which the composer intervenes in the processes s/he sets into motion. 51

Page  52 ï~~CPA is designed to allow the user to intervene in the compositional process at a variety of levels: " At the bottom-most level: The user composes "by hand" the actual outer voices and specifies the possible chords and possible lines from which the counterpoint will be constructed. Composing two of the voices (usually the outer-voices) "by hand" gives the user direct control over the contour and character of the final complex texture. Rigorous counterpoint in three, four, five and more voices is significantly more difficult to compose (unassisted) than is counterpoint in two voices. CPA allows the user easily to find all possible solutions to the problem of adding one or more voices voice (up to twelve voices total) and to audition them. Â~ At some middle leyels: The user auditions and chooses from CPA's output and determines the principles according to which further machine-composition can be used to combine and elide the segments of counterpoint selected. At one pass, CPA will likely produce some solutions that the user will find intolerable (using, perhaps, chord inversions that do not work well in context). If the original counterpoint and the harmonic and melodic "palettes" is well-constructed, CPA will likely produce many solutions that the user finds tolerable, and a very fv solutions that the user finds beautiful and fertile for further development. The process of "screening" the counterpoint produced is completely different than the process of composing note-to-note ("by hand"). At this point, the user is placed in the role of "director" (auditioning a number of possible solutions produced by the program), and then of a sculptor (cutting and combining contrapuntal segments). " At the top level: The user screens the results of machine-composed sequences and combinations of contrapuntal segments, refining the structure laid out at the middle level. There has been some interesting music made by composers who attempt pure machine composition (no direct composer intervention) and by those who put forth the output of their musical systems (whether computer-composed or not) as an unadulterated report on the efficiency of their compositional system. The current project, however, adopts a different means and perhaps a different aim. I am not ultimately interested in machine composition, but simply in producing, by whatever means prove useful, the "best" music I can, according to my own complex and idiosyncratic standards. In short, my own aesthetic "top-level" is at least partly intuitive and this aesthetic position leads me to leave a lot of machine-composed music on the cutting-room floor and allows a lot of cheerful tampering with the output of my compositional systems. Ultimately, CPA is not designed to produce necessarily complicated music. Rather, it assigns to the computer whatever complex processes may be necessary to produce output a small proportion of which may be compeling and integrated - and thus, in an important sense, simple. 4. ACKNOwLEDGMENTS This research was performed on equipment purchased out of a "Seed Funds" grant from the Graduate Division at the University of California Santa Cruz. 52