Musical dice game

It was the (nowadays almost unknown) composer and musicologist Johann Philipp Kirnberger (1721–1783) who in 1757 brought musical dice games into fashion as a popular pastime with his publication “Der allezeit fertige Polonoisen- und Menuettenkomponist”. Earlier, Johann Sebastian Bach‘s second son, Carl Philipp Emanuel Bach (1714–1788), had realized the idea of incorporating chance in composing with his paper “Einfall, einen doppelten Contrapunct in der Octave von sechs Takten zu machen, ohne die Regeln davon zu wissen” (“An idea to make a double contrapunct in the octave of six measures without knowing the rules”).

The most famous such musical dice game is attributed to Wolfgang Amadeus Mozart (1756–1791). His “Instruction to compose as many waltzes or sliders with two dice as one likes without being musical nor understanding anything about composition” was published in 1793 after his death by Johann Julius Hummel (Berlin-Amsterdam).

The underlying principle of the musical dice games is to produce a uniform and periodically running piece of music, where the selection of the bars is done randomly, for example by rolling dice. The compositions on which this random selection is based are usually waltzes, polonaises or minuets.

By means of the experiment “Musical Dice Game” in MATHEMATICS ADVEBTURE LAND, Wolfgang Amadeus Mozart’s idea of selecting 16 measures from 176 measures arranged in two tables (see below) by rolling the dice 16 times, and thus composing a “new” piece of music (waltz), can be realized. Also acoustically!

One needs two dice and the following two tables:

Table 1
Table 2

The Roman numerals above the 8 columns of the two tables indicate the 8 measures of the two waltz parts. The Arabic numerals indicate the numbers of the bars, the numbers 2–12 in the “head columns” of the tables indicate the sum of the numbers of the dice of the two bars. For the first 8 bars to be rolled, use table 1, for the 8 more bars use table 2.

If, for example, the first roll of the two dice results in the number 3 as the sum of the numbers of the eyes (i.e. one of the two dice shows the number “1”, the other dice the number “2”), then one finds the number of the bar part in the first column (and 3rd row): 32. If a first repetition of the dice process results in the number 10 as the sum of the two numbers of the eyes rolled, for example, one continues with bar part 142. This procedure is to be continued, with the change from the first to the second table occurring (automatically) after the 8th roll of the dice.

And now … the mathematics of it:

Naturally, this musical experiment raises the question of how large the number of different pieces consisting of 16 bars is. Combinatorics (systematic “counting”) provides the answer: It is exactly $$11^{16}= 45,949,729,863,572,161,$$

because every piece of music (in the MATHEMATICS ADVENTURE LAND a waltz) consists of 16 bars and the number of possible choices for each of these bars is 11. This is a huge number of possibilities beyond our imagination. In “Mathematik zum Anfassen” of the Mathematikum Gießen the following interpretation of this number $11^{16}$ can be found:

“If Mozart had played one of the possible pieces every second from birth, and if he had done nothing else his whole life but play these pieces, and if he were still alive today — then he would just not have managed nearly one per mille (0.1%) of all possibilities.”

Conclusion: Every visitor who performs the experiment with the two dice “composes” a new Mozart waltz with probability bordering on certainty!


[1] Beutelspacher A. u.a., Mathematik zum Anfassen, Mathematikum Gießen, 2005.

[2] Mozart, W.A.: Mathematisches Würfelspiel, Hrsg. K.-H. Taubert, Schott Musik International, Mainz, 1956.

[3] Kirnberger, J.Ph.: Der allezeit fertige Polonoisen- und Menuettencomponist, publizert bei Christian Friedrich Winter, Berlin, 1757.

[4] Reuter, Ch.: Musikalische Würfelspiele, 1 CD-ROM … von Mozart, Haydn und anderen großen Komponisten, Schott Musik International, Mainz, 2001.