Mozart Dice Game
Algorithmic recombinatorial music has a long heritage, even as far back as Mozart. His Musikalisches Würfelspiel was a dice game where the results of throws choose amongst possible prewritten bars of music. Depending upon the numbers thrown, different, but similar, pieces can result. Read about it in the Computer Music Tutorial (Roads 1996) starting on page 823. The full music for it can be found in the Appendix of Schwanauer & Levitt (1993) 'Machine Models of Music' The MIT press. There is also a discussion of it in Roads, C. 1996. 'The Computer Music Tutorial'.
This demo is a realisation of Mozart's design in jMusic by Andrew Troedson.
To hear the result play the MIDI file below.
Andrew Troedson's comments:
W.A.Mozart's Musikalisches Wurfelspiel (Musical Dice Game) is one of the earliest examples of chance music. It sets out a series of short phrases which are selected randomly (based on the rolls of a dice), and combined to form a two-part waltz. This approach to the generation of music is known as the combinatorial approach because it involves the combination of a series of pre-composed musical elements.
Utilizing the jMusic structure, this realization of Mozart's Dice Game automates the dice rolling process, and allows waltzes to be generated using Mozart's original rules and phrases.
It is set out in two classes - MozartDiceGame.java, and MozartPhraseList.java. The MozartPhraseList class holds all the phrases (actually stored as CPhrases) which are combined to form the finished waltz, and the MozartDiceGame class automates the dice rolling process which accomplishes this. The default name of the generated MIDI file is "mozart.mid".
There is no doubt that the process is effective - an (almost) infinite number of waltzes can be generated, and each one has the distinct sound that is attributed to Mozart. Unfortunately, this means that one cannot really take credit for the composition of a new work as each one is obviously a composition of Mozart.
It is also disappointing to realize that, while each generated new work does have its subtle differences, nothing extraordinary or excitingly new will ever be produced. This is mainly because Mozart has composed the phrases to follow a strict harmonic structure that remains unchanged in every new generation. The reason that he has done this is obvious - it is the easiest way to guarantee that each generation will sound correct (however this does come at the cost of spontaneity).
As well as the realization that Mozart made things easy for himself by enforcing this rigid harmonic structure on the phrases he composed, I was heartened to discover that such a great composer could be accused of "cheating" a little, and of "cutting corners". The last bar of the first part of the waltz (bar 8) is not in fact chosen by chance - this is because the eight options given by Mozart to fill this bar are identical! Mozart uses a similar tactic in the last bar of the second part (bar 16), and provides only three differing options for this bar. Again, the reasons behind this little deceit are obvious (as are the costs to the spontaneity of the music produced) - to guarantee that each generation will sound correct.
Let's have a closer look.
This is the first part of the data base class. It employs two dimensional arrays of Chord Phrases. The first bar is shsown and each other bar is filled similarly. There are 8x16 bars!! (minus some Mozart repeats).