Difference between revisions of "Musical dice game"
(→humcat) |
(→humcat) |
||
Line 142: | Line 142: | ||
file2.krn: | file2.krn: | ||
+ | <table> | ||
+ | <tr><td> | ||
+ | <pre>**kern **kern | ||
+ | =161 =161 | ||
+ | 4C 16eeLL | ||
+ | . 16gg | ||
+ | . 16ee | ||
+ | . 16ccJJ | ||
+ | 4D 16bLL | ||
+ | . 16a | ||
+ | . 16g | ||
+ | . 16f#JJ | ||
+ | *- *- | ||
+ | </pre> | ||
+ | </td><td> | ||
<humdrum>**kern **kern | <humdrum>**kern **kern | ||
=161 =161 | =161 =161 | ||
Line 154: | Line 169: | ||
*- *- | *- *- | ||
</humdrum> | </humdrum> | ||
+ | </td></tr></table> | ||
The command: | The command: |
Revision as of 18:53, 12 March 2019
Several 18th century composers such as Mozart and Haydn composed music which is performed by rolling dice to determine the sequence of measures in the music. The table below contains one of these dice-game compositions: Musikalische Würfelspiele (Musical Dice Game), Kontre-Tänze (Contra-Dance), K6 Anh. C30.01 (K3 Anh. 294d) by Wolfgang Mozart.
The piece is generated by rolling a pair of dice. The outcome of the dice roll is a number between 2 and 12. For each measure in the composition there is a set of 11 possible measures which are chosen by the dice roll. For example, if a 9 is rolled for the first measure of the piece, pre-composed measure #142 will be the first measure of the generated composition. If a three is rolled for the second measure, then measure #64 will be the second measure of the generated composition. You can view the individual measures in Humdrum text format or in MIDI file format in the table below.
Contents
Individual measures
Here are tables of the individual measures for the dice game in the Humdrum and MIDI formats:
Humdrum files
A section
ROLL: 2 3 4 5 6 7 8 9 10 11 12 |
B section
ROLL: 2 3 4 5 6 7 8 9 10 11 12 |
MIDI files
A section
ROLL: 2 3 4 5 6 7 8 9 10 11 12 |
B section
ROLL: 2 3 4 5 6 7 8 9 10 11 12 |
Generating a full score
To generate a composition, roll the dice 16 times, and choose a measure each from columns A1 through A8 and B1 through B8. The tables below give a list of 100 random realizations of the contra-dance (the first table in Humdrum and the second rendered into MIDI files).
Humdrum rendered scores
Humdrum reslized scores
001 002 003 004 005 006 007 008 009 010 |
MIDI rendered scores
001 002 003 004 005 006 007 008 009 010 |
humcat
To combine the individual measures, use the humcat command. This command will join two or more Humdrum files into a single data stream. For example, with these two files:
file1.krn:
**kern **kern =122 =122 4C 8ccL . 8gJ 4CC 8eL . 8cJ *- *- |
<humdrum>**kern **kern =122 =122 4C 8ccL . 8gJ 4CC 8eL . 8cJ
</humdrum> |
file2.krn:
**kern **kern =161 =161 4C 16eeLL . 16gg . 16ee . 16ccJJ 4D 16bLL . 16a . 16g . 16f#JJ *- *- |
<humdrum>**kern **kern =161 =161 4C 16ee . 16gg . 16ee . 16cc 4D 16b . 16a . 16g . 16f#
</humdrum> |
The command:
humcat file1.krn file2.krn
will generate the following composite data:
**kern **kern =122 =122 4C 8ccL . 8gJ 4CC 8eL . 8cJ =161 =161 4C 16eeLL . 16gg . 16ee . 16ccJJ 4D 16bLL . 16a . 16g . 16f#JJ *- *- |
<humdrum>**kern **kern =122 =122 4C 8ccL . 8gJ 4CC 8eL . 8cJ =161 =161 4C 16eeLL . 16gg . 16ee . 16ccJJ 4D 16bLL . 16a . 16g . 16f#JJ
</humdrum> |
humcat can join any Humdrum files which contains the same number of spines and matched exclusive interpretations at the join points.
Suppose the you roll dice with this pattern: "2 5 10 6 3 8 9 9". Then, you can generate the A section of the contra-dance with the following command:
humcat cda000.krn cda070.krn cda114.krn cda086.krn cda071.krn \ cda149.krn cda125.krn cda023.krn cda089.krn > partA.krn
If you use the same dice rolls to generate the second section, this is the command which would be run:
humcat cda155.krn cda157.krn cda029.krn cda019.krn cda031.krn \ cda080.krn cda096.krn cda127.krn > partB.krn
To generate the final composition, combine partA.krn and partB.krn together:
humcat partA.krn partA.krn partB.krn > full.krn
Exercises
First, download the individual measures to your local computer. Or, alternatively go to the kernscores website and download a zip file of the source material. Click on the "Z" button on the page:
http://kern.ccarh.org/cgi-bin/browse?l=dice/mozart
Generate an example composition by rolling some dice and using humcat to combine the individual measures into a single Humdrum file. Then convert that file to MIDI and listen to it. Repeat until bored. To generate a large number of variants, download and run this PERL script. If you do not have real dice, you can borrow my pair of virtual dice, by typing the command (BASH shell version):
NUM=$RANDOM; let "NUM %= 12"; let "NUM += 1"; echo $NUM Or a PERL language version:
perl -e "print 2+int(rand(6))+int(rand(6))"
For example, if you roll a 7 and then an 11, then the combining command would be:
humcat cda000.krn cda165.krn cda085.krn
Which will start the composition with these two measures:
Combine some of the measures in a non-proscribed way. For example, paste the measures together in reverse order. What does the music sound like?
Examine the musical key of each individual measure in the composition. In particular, choose a row from the A or B columns and measure the key in each measure listed on that row. For example, the key of measure 060 which is for roll 11 in the B8 column is in the key of C Major:
keycor h://dice/mozart/cda060.krn
The best key is: C Major
What is the pattern of musical keys for measures in a particular row? What is the pattern of keys in measures in a particular column?
Create a set of realized contradances, then identify the musical key of the dance by using the Humdrum command "key", or the Humdrum Extras command "keycor". Are all of the compositions in the same key or different keys accoring to the key program?