What lies behind us
and what lies before us are tiny matters
when compared to what lies within us.
- Oliver Wendell Holmes
Joseph II — Holy Roman Emperor (1741 - 1790) "Too many notes."
Joseph's comments were to Mozart regarding his opera
Die entfûhrung aus dem Serail [The Escape from the Seraglio]. According to Niemetschek's bio of "Woofie," Joseph was charmed by the stirring music, nevertheless commented, "Too beautiful for our ears and an extraordinary number of notes, dear Mozart." With the noble dignity and frankness so often present with genius, Mozart replied, "Just as many, Your Majesty, as are necessary."
Topic:
THE MARKOV MELODY ENGINE:
GENERATING RANDOM MELODIES WITH TWO-STEP MARKOV CHAINS
So, what is the Markov melody engine?
Stochastic algorithms have had a consistent, if somewhat disreputable, role in western musical composition at least since the 18th century. W. Mozart's
Musikalisches Wurfelspiel is perhaps the best known, but other composers, including J. Haydn and C. P. E. Bach dabbled in this domain. As the name suggests, this method of recombining carefully composed musical elements in random orders according to a throw of the dice, was seen as an amusing novelty, not as a serious compositional tool. Peter Welcker published in 1775, in London, a
"Tabular System Whereby Any Person without the Least Knowledge of Musick May Compose Ten Thousand Different Minuets in the Most Pleasing and Correct Manner".
In the twentieth century, the inclinations toward indeterminate notation on the one hand, and formalized (serial) compositional strategies on the other, came together in the application of formal probability theory to music. This has gone in two directions: One, indeterminate composition, in which the precise choice of notes is turned over to dice, coins, or a computer pseudo random number generator; two, compositions more or less formally inspired and structured by probability theory. The first mode has been advocated perhaps most prominently by John Cage, the second by Iannis Xenakis, who after some initial reticence plunged into the first as well.
Chance procedures can act on any element of music: pitch, timbre, rhythm, choice of musicians, time and location of the performance, choice of repertoire, etc. Most popular are random pitches, perhaps because of the superordinate role played by melody in Western music, and the early appearance of a tractable theory of musical pitches. The systems for generating random sequences of pitches have been generally of two types. The simplest approach is pitch-centered, most commonly a Markov chain, where each pitch has a distribution given for its successors.
A bit more continuity is achieved by interval-based programs. Here one might define, say, 15 possible intervals, ranging in chromatic steps from a perfect fifth down, to a perfect fifth up, and give a stochastic matrix which defines the probability of one interval following another. For instance, it might be that a perfect fourth down is likely right after a halfstep up, but unlikely after another perfect fourth down. Such a model can have a minimal sense of direction, but all sense of key is lost. The melody will wander willy-nilly over the available pitches, without significantly emphasizing the notes of any scale.
As an experiement, I would like to combine these approaches, allowing some control over the pitch statistics, together with some memory for the direction. The obvious thing to do is to define a Markov chain whose states are several pitches in a row. For larger values of ell, this will allow quite good approximations to the statistics of genuine melodies, allowing us to distinguish between the likelihood of, for example, C \Gamma D \Gamma E \Gamma F and F \Gamma D \Gamma E \Gamma F . On the other hand, as ` increases the complexity of the model grows exponentially. If there are n pitches, and the memory is ` notes long, then we need n ` (n \Gamma 1) numbers to specify the model.
There is a danger of overspecifying. If I imitate order-10 probabilities from a fund of prior melodies, I am likely to end up largely imitating them piecewise note for note, while excluding some possibilities that were musically reasonable, but which happen to be absent from the data set.