A Bartók Engine/Kaleidoscore
an automated composition project

by
©
Winter, 1998

What is "automated composition"?: click here

I have begun work on a program which will ideally act as an engine for creating compositions in the style of Béla Bartók, and in particular, his solo piano music in Mikrokosmos. In analyzing Bartók's "From the Diary of a Fly" (Mikrokosmos, Vol. 6, no. 142) (see essay) I have realized that patterns in his music are manipulated in a combination of very simple binary operations: transposition up or down a half step, inversion, retrograde, polyphonic or canonic textures (are the two hands working independently or in imitation?; also, is this imitation simultaneous or delayed?), etc. Such binary changes lend themselves well to computer control, and I hypothesize that in isolating the dynamic parameters within "From the Diary of a Fly" and other pieces from Mikrokosmos it will be possible to write a program that outputs Bartók-sounding music. All that will be necessary for such a program, I believe, will be an input of a short segment of piano music, after which the program will then compute and output a composition of a certain length based solely on manipulations of this initial input: sort of how, say, a kaleidoscope effects a certain input of light. Leaving much of the manipulation to chance, furthermore, no two compositions from the same input should be the same. Ideally, I would like to create the input directly from a Yamaha Disclavier digital piano and to have the program also perform its output onto the Disclavier, but it is too early for me to decide yet how the implementation will actually be realized.


In the draft for my Bartók Engine I have delegated processing of the given input of music into a hierarchy which defines a chain of command with the following levels of development: (1.) processes which define the overall global structure of the piece, (2.) processes which define action for the different sections within this global structure, (3.) motivic processes which develop progress within the sections, and lastly (4.) atomic processes which make decisions within the motives and process the composition at the minutest level, be it every eighth-note or sixteenth-note value (see figure below). Basically, the progress of the piece is defined through constant repetition of the given input. This "ostinato" is always varying, however, at some, if not all, of the different levels so that unpredictable transformations occur and constantly change the character of the piece. These unpredictable transformations, furthermore, are contained in structured ways that lend unity to the piece as a whole. I will now outline general procedures for each of the levels of process to give a sense of how I imagine the engine will operate. I will proceed from the sectional level down to the atomic, and lastly define the global structure, since its understanding depends on the information of the others.

Sectional Level of Process

At the sectional level of process in the Bartók Engine, I have defined seven different processes of manipulation: repetition, canon, imitation, phasing, polyphony, changes in range, and changes in speed. Repetition, obviously, repeats the given input—for my purposes, the "given input" being the last motive in the ongoing ostinato of the piece; as with all of these sectional processes, however, variation may still occur at the motivic and/or atomic level(s). Canon is an imitation between the two hands in which the melody in one hand is imitated exactly and completely by the successive entrance of the other. The entrance of the imitating hand may, furthermore, occur with some overlap of the other hand or interrupt it. Also, when there is no overlapping in the canon, the separate hands may have independent melodies (of equal length): the motives of either hand in this case are then swapped successively from one instance of the canon to the next. Imitation is a process which forces one hand to concurrently perform the same motive—its intervals and rhythms—as the other: this is like a canon, but with complete overlap of the voices. By contrast, in polyphony the two hands are melodically independent: motivic and atomic processes are uncoordinated between them, deriving material in either hand that is no longer interrelated. Phasing is like imitation, but juxtaposes repeating motives of unequal length: one hand will imitate the other, but its length is shortened at the outset by some degree, causing a shifting imbalance.

By their nature, the five sectional processes described thus far cannot occur in combination: they are mutually exclusive, and at any time in the duration of the composition one or another of these processes will be occurring. The two sectional processes I have not described yet, however, can only occur in combination with one of these mutually exclusive processes: changes of range, and changes of speed. Changes of range are achieved by either climbing or falling: climbing and falling patterns refer to handling pitch, and can either function to expand the range or not, depending on whether the two hands imitate their direction or go in opposite ways. Changes of speed either work to speed up or slow down the composition. These speeding up and slowing down patterns, furthermore, will only deal with non-tempo-driven parameters: they give a sense of speed or drag by shortening or increasing the lengths of motives, changing the rate of imitation in a canon, or by introducing an augmenting or diminishing rate of accentuation.

Motivic Level of Process

On the motivic level of process, decisions must be made from motive to motive for the sectional processes that are in operation. There are six binary "flags" which I have considered in light of Mikrokosmos: transpose, augment, diminish, invert, retrograde, and recall. Also, the probabilities of these flags being true and performing their function are different for each of the five mutually exclusive sectional processes. Recall is especially important since it decides when the composition should return to motives previously established in the ongoing chain, creating important structural associations for what would otherwise be a through composed (A->Z) composition. Rhythmic augmentation and diminution in the program deal mostly with their classical forms—addition of the rhythmic values of a motive to themselves, or withdrawal of half the values—but more complicated forms of augmentation or diminution (ex. addition of a third or a quarter of the values; withdrawal of the dot—or a third of the values; etc.), as used by Olivier Messiaen, for example, could easily be incorporated. For each of the motivic decisions, furthermore, it must be decided if the function should process both hands or only one (and which one): information which should be passed down from the section currently in operation. "Motive" is defined in the program as a musical segment of a certain length of atoms: its material and length are originally established by the input of the user; after the opening of the piece, however, operations always occur to the last motive in the ongoing ostinato (unless, of course, a recall is enacted), creating, thus, a chain of manipulations.

Atomic Level of Process

On the atomic level of process there are five functions which can vary the given material at any point within the composition, based on analysis of Mikrokosmos. Each motive in the composition is subsequently fed through the atomic level of process and decisions are made at every atom in its length. The length of an "atom" is defined at the outset of the composition and will probably default to a sixteenth-note time value. The probability of these atomic functions is small (only a 25% chance at each atom), but since they are decided for at every atom in the composition a decent amount of variation at this level will occur. Notes can be given longer duration (making them more "on") with an extendNote flag; notes can be replaced with rests (turning notes "off") with a playNote flag; notes can go up instead of down with the invertStep flag; the accentNote flag should create a sense of unexpected and asymmetrical accentuation patterns; and transposeNote will create unexpected transpositions.

Global Level of Process

At the global level of process, the arrangement of the sectional processes will be given an order at the outset of the program, defining the structural arrangement of the composition. Two basic arrangements can be decided from, and other options such as changes in range, changes in speed, and phasing are subsequently inserted according to certain probabilities. The arrangement will either progress to a climactic imitation section (as in "From the Diary of a Fly") or begin with imitation and reach a climax through gradual dissociation into polyphony: thus, either unification or dissociation is the goal of the piece. In either case, the structure will assume a palindrome, reversing in the composition's resolution the order of the sectional processes which lead to the climax. An overall formal symmetry, therefore, will contain the asymmetries produced by randomly chosen variations at the other levels of process: something Bartók loved to do. Another global process will be the overall dynamic progress of the piece, which can either start loud and get soft at the climax or vice versa; this also behaves like a palindrome, reversing its procedure after the climax. Internal dynamic changes will occur within sections when a climbing or falling pattern occurs (see change of range), but these will be subsidiary to the overall dynamic level. Lengths of the development, climax, and resolution are based roughly on pieces in Mikrokosmos VI, and particularly on "From the Diary of a Fly."


The eventual codification of this outline will have to take into consideration that in the processing of the composition data is constantly needed from previously computed motives—usually the previous one in the ongoing chain of manipulation, but also sometimes from earlier sections in the piece. It should also be noted that the composition is essentially two ongoing streams of information: the right hand and the left hand. At times, the contents of one hand will be replicated by the other (as in imitation), and to this end there must exist some form of communication between the hands when necessary. In the employment of motivic processes, furthermore, attention will have to be paid to the simultaneous or separate processing of the hands: will two motives of input be passed to the same function (i.e. left hand and right hand), or will two unrelated functions each be passed only a single motive?

The following sound files demonstrate a prototype that I have developed in Lisp and Common Music (CM) for MIDI score generation. Each is a different run of the program on the same initial input, a small motif in Bartók's "From the Diary of a Fly", which is first provided below in a short loop:

~end~

top of page



©1998, john a. maurer iv