We will show an implementation of this game that works with both BP2.9.8 and BP3. The BP3 example has already been introduced in the page Bol Processor ‘BP3’ and its PHP interface. Here we will focus on the improvisational aspects.
The implementation took time because the score fragments were not available in digital format. Today, similar projects can be easily handled using MusicXML scores and the import procedure implemented in the Bol Processor BP3.
At the bottom of the settings, the note convention has been set to "French". At the top of it is the "seed for randomization" which deserves a comment.
Computers produce sequences of random numbers determined by successive calls to the rand() function in the C programming language. Another function called srand(x) reseeds the sequence with number "x": the seed. A given seed will produce the same sequence for subsequent calls of rand(). The only way to get unpredictable sequences is to use a different seed each time a random sequence is required. In other words, shuffle the cards. To do this, the Bol Processor picks up a seed in the time() function which returns the current date/time as an integer number.
Here, the seed is set to "999". Unless modified, the sequence of variations of Mozart's dice game should be identical (on the same computer). In order to generate random sequences we need to instruct the machine to reseed the sequence with an arbitrary number of its choice. By convention, this is done by setting the seed to 0.
Below you can hear a sequence of 10 variations created with seed = 999. The MIDI file was downloaded and sent to a PianoTeq synthesiser tuned to equal temperament:
These examples are played on electronic instruments tuned to equal temperament. However, Bol Processor + Csound can produce the same by exploiting microtonality to produce works tuned in different temperaments or in pure intonation. Below is the same set of pieces using Zarlino's meantone temperament (Asselin 2000 p. 85):
Finally, "just intonation" can be achieved by retuning the instrument at each measure to match the harmonic context, as explained on the page Just intonation, a general framework. This gives the following interpretation — the best tuning, in my opinion:
The MIDI format does not allow for these precise context-sensitive microtonal adjustments.
A challenging aspect of this game is that there is no equal probability of getting numbers in the range 2 … 12. For example, a sum of 7 is six times more likely than a sum of 2 or 12. The designer of this game may have been aware of this, as the less likely numbers have been mapped to musical sequences that sound more "dissonant".
In order to simulate the dice game, it was therefore necessary to assign weights to the rules that reflected the real probabilities. This was achieved in the grammar (below) by assigning weights K1, K2 etc. to all rules activated by dice rolls.
-se.Mozart
// Use a harpsichord or piano sound
LIN [Select rules randomly and apply from left to right]
gram#1[1] S --> _vel(80) A B
gram#1[2] A --> A1 A2 A3 A4 A5 A6 A7 A8 A1 A2 A3 A4 A5 A6 A7 A'8
gram#1[3] B --> B1 B2 B3 B4 B5 B6 B7 B8 B1 B2 B3 B4 B5 B6 B7 B8
LIN
gram#2[1] <K1=1> A1 --> T96
gram#2[2] <K2=2> A1 --> T32
gram#2[3] <K3=3> A1 --> T69
gram#2[4] <K4=4> A1 --> T40
gram#2[5] <K5=5> A1 --> T148
gram#2[6] <K6=6> A1 --> T104
gram#2[7] <K7=5> A1 --> T152
gram#2[8] <K8=4> A1 --> T119
gram#2[9] <K9=3> A1 --> T98
gram#2[10] <K10=2> A1 --> T3
gram#2[11] <K11=1> A1 --> T54
LIN [These rules could be mixed with the preceding ones. But production is faster in this way.]
gram#3[1] <K1> A2 --> T22
gram#3[2] <K2> A2 --> T6
gram#3[3] <K3> A2 --> T95
gram#3[4] <K4> A2 --> T17
gram#3[5] <K5> A2 --> T74
gram#3[6] <K6> A2 --> T157
gram#3[7] <K7> A2 --> T60
gram#3[8] <K8> A2 --> T84
gram#3[9] <K9> A2 --> T142
gram#3[10] <K10> A2 --> T87
gram#3[11] <K11> A2 --> T130
LIN
gram#4[1] <K1> A3 --> T141
gram#4[2] <K2> A3 --> T128
gram#4[3] <K3> A3 --> T158
gram#4[4] <K4> A3 --> T113
gram#4[5] <K5> A3 --> T163
gram#4[6] <K6> A3 --> T27
gram#4[7] <K7> A3 --> T171
gram#4[8] <K8> A3 --> T114
gram#4[9] <K9> A3 --> T42
gram#4[10] <K10> A3 --> T165
gram#4[11] <K11> A3 --> T10
LIN
gram#5[1] <K1> A4 --> T41
gram#5[2] <K2> A4 --> T63
gram#5[3] <K3> A4 --> T13
gram#5[4] <K4> A4 --> T85
gram#5[5] <K5> A4 --> T45
gram#5[6] <K6> A4 --> T167
gram#5[7] <K7> A4 --> T53
gram#5[8] <K8> A4 --> T50
gram#5[9] <K9> A4 --> T156
gram#5[10] <K10> A4 --> T61
gram#5[11] <K11> A4 --> T103
LIN
gram#6[1] <K1> A5 --> T105
gram#6[2] <K2> A5 --> T146
gram#6[3] <K3> A5 --> T153
gram#6[4] <K4> A5 --> T161
gram#6[5] <K5> A5 --> T80
gram#6[6] <K6> A5 --> T154
gram#6[7] <K7> A5 --> T99
gram#6[8] <K8> A5 --> T140
gram#6[9] <K9> A5 --> T75
gram#6[10] <K10> A5 --> T135
gram#6[11] <K11> A5 --> T28
LIN
gram#7[1] <K1> A6 --> T122
gram#7[2] <K2> A6 --> T46
gram#7[3] <K3> A6 --> T55
gram#7[4] <K4> A6 --> T2
gram#7[5] <K5> A6 --> T97
gram#7[6] <K6> A6 --> T68
gram#7[7] <K7> A6 --> T133
gram#7[8] <K8> A6 --> T86
gram#7[9] <K9> A6 --> T129
gram#7[10] <K10> A6 --> T47
gram#7[11] <K11> A6 --> T37
LIN
gram#8[1] <K1> A7 --> T11
gram#8[2] <K2> A7 --> T134
gram#8[3] <K3> A7 --> T110
gram#8[4] <K4> A7 --> T159
gram#8[5] <K5> A7 --> T36
gram#8[6] <K6> A7 --> T118
gram#8[7] <K7> A7 --> T21
gram#8[8] <K8> A7 --> T169
gram#8[9] <K9> A7 --> T62
gram#8[10] <K10> A7 --> T147
gram#8[11] <K11> A7 --> T106
LIN
gram#9[1] A8 --> T5
gram#9[2] A'8 --> T'5
LIN
gram#10[1] <K1> B1 --> T70
gram#10[2] <K2> B1 --> T117
gram#10[3] <K3> B1 --> T66
gram#10[4] <K4> B1 --> T90
gram#10[5] <K5> B1 --> T25
gram#10[6] <K6> B1 --> T138
gram#10[7] <K7> B1 --> T16
gram#10[8] <K8> B1 --> T120
gram#10[9] <K9> B1 --> T65
gram#10[10] <K10> B1 --> T102
gram#10[11] <K11> B1 --> T35
LIN
gram#11[1] <K1> B2 --> T121
gram#11[2] <K2> B2 --> T39
gram#11[3] <K3> B2 --> T139
gram#11[4] <K4> B2 --> T176
gram#11[5] <K5> B2 --> T143
gram#11[6] <K6> B2 --> T71
gram#11[7] <K7> B2 --> T155
gram#11[8] <K8> B2 --> T88
gram#11[9] <K9> B2 --> T77
gram#11[10] <K10> B2 --> T4
gram#11[11] <K11> B2 --> T20
LIN
gram#12[1] <K1> B3 --> T26
gram#12[2] <K2> B3 --> T126
gram#12[3] <K3> B3 --> T15
gram#12[4] <K4> B3 --> T7
gram#12[5] <K5> B3 --> T64
gram#12[6] <K6> B3 --> T150
gram#12[7] <K7> B3 --> T57
gram#12[8] <K8> B3 --> T48
gram#12[9] <K9> B3 --> T19
gram#12[10] <K10> B3 --> T31
gram#12[11] <K11> B3 --> T108
LIN
gram#13[1] <K1> B4 --> T9
gram#13[2] <K2> B4 --> T56
gram#13[3] <K3> B4 --> T132
gram#13[4] <K4> B4 --> T34
gram#13[5] <K5> B4 --> T125
gram#13[6] <K6> B4 --> T29
gram#13[7] <K7> B4 --> T175
gram#13[8] <K8> B4 --> T166
gram#13[9] <K9> B4 --> T82
gram#13[10] <K10> B4 --> T164
gram#13[11] <K11> B4 --> T92
LIN
gram#14[1] <K1> B5 --> T112
gram#14[2] <K2> B5 --> T174
gram#14[3] <K3> B5 --> T73
gram#14[4] <K4> B5 --> T67
gram#14[5] <K5> B5 --> T76
gram#14[6] <K6> B5 --> T101
gram#14[7] <K7> B5 --> T43
gram#14[8] <K8> B5 --> T51
gram#14[9] <K9> B5 --> T137
gram#14[10] <K10> B5 --> T144
gram#14[11] <K11> B5 --> T12
LIN
gram#15[1] <K1> B6 --> T49
gram#15[2] <K2> B6 --> T18
gram#15[3] <K3> B6 --> T58
gram#15[4] <K4> B6 --> T160
gram#15[5] <K5> B6 --> T136
gram#15[6] <K6> B6 --> T162
gram#15[7] <K7> B6 --> T168
gram#15[8] <K8> B6 --> T115
gram#15[9] <K9> B6 --> T38
gram#15[10] <K10> B6 --> T59
gram#15[11] <K11> B6 --> T124
LIN
gram#16[1] <K1> B7 --> T109
gram#16[2] <K2> B7 --> T116
gram#16[3] <K3> B7 --> T145
gram#16[4] <K4> B7 --> T52
gram#16[5] <K5> B7 --> T1
gram#16[6] <K6> B7 --> T23
gram#16[7] <K7> B7 --> T89
gram#16[8] <K8> B7 --> T72
gram#16[9] <K9> B7 --> T149
gram#16[10] <K10> B7 --> T173
gram#16[11] <K11> B7 --> T44
LIN
gram#17[1] <K1> B8 --> T8
gram#17[2] <K2> B8 --> T78
gram#17[3] <K3> B8 --> T8
gram#17[4] <K4> B8 --> T8
gram#17[5] <K5> B8 --> T8
gram#17[6] <K6> B8 --> T8
gram#17[7] <K7> B8 --> T8
gram#17[8] <K8> B8 --> T8
gram#17[9] <K9> B8 --> T8
gram#17[10] <K10> B8 --> T8
gram#17[11] <K11> B8 --> T8
SUB1 [Substitute only once.]
gram#18[1] T1 --> {fa3 re3 sol3,fa5 re5 sol5}
gram#18[2] T2 --> {{2,si2,sol3}-,la4 {2,fa#4 sol4 si4 sol5}}
gram#18[3] T3 --> {{2,do3,mi3}-,sol5 do5 mi5}
gram#18[4] T4 --> {{1,sol2 si2} sol3 si2,sol5 re5_}
gram#18[5] T5 --> {sol2 {2,sol3 fa3 mi3 re3}, {2,sol4,si4,re5,sol5}-}
gram#18[6] T'5 --> {sol2 {2,si3 sol3 fa#3 mi3}, {2,sol4,si4,re5,sol5}-}
gram#18[7] T6 --> {{2,do3,mi3}-,sol4 do5 mi5}
gram#18[8] T7 --> {{2,do3,sol3}-,mi5 do5 mi5 sol5 do6 sol5}
gram#18[9] T8 --> {do3 sol2 do2,do5_ -}
gram#18[10] T9 --> {sol3_ sol2,{do5,mi5}{si4,re5}-}
gram#18[11] T10 --> {sol3_ -,si4 la4 si4 do5 re5 si4}
gram#18[12] T11 --> {do3 re3 re2,mi5 do5 si4 la4 sol4 fa#4}
gram#18[13] T12 --> {do3 do3 do3,{mi4 mi4 mi4},{do5 do5 do5}}
gram#18[14] T13 --> {{2,mi3,sol3}-,do5 sol4 mi4}
gram#18[15] T15 --> {{2,do3,sol3}{do3,mi3},mi5 {1,sol5 mi5}do5}
gram#18[16] T16 --> {{2,re3,fa#3}{do3,fa#3},la5 fa#5 re5}
gram#18[17] T17 --> {{2,mi3,sol3}-,do5 sol4 do5 mi5 sol4 do5}
gram#18[18] T18 --> {{2,do3,mi3}{do3,sol3},sol4 do5 mi5}
gram#18[19] T19 --> {{2,do3,sol3}{do3,mi3},{1,mi5 do5}mi5 sol5}
gram#18[20] T20 --> {si2_ -,sol5{1,si5 re6}re5}
gram#18[21] T21 --> {do3 re3 re2,do5 mi5 sol5 re5 la4 fa#5}
gram#18[22] T22 --> {do3_ -,mi5 do5 sol4}
gram#18[23] T23 --> {{3,fa3 mi3 re3 mi3 fa3 sol3},fa5 mi5 re5 mi5 fa5 sol5}
gram#18[24] T25 --> {re3_ do3,re4 fa#4 la4 re5 fa#5 la5}
gram#18[25] T26 --> {{3,do3 mi3 sol3 mi3 do4 do3}, {do5,mi5}{do5,mi5}{do5,mi5}}
gram#18[26] T27 --> {{2,sol3,si3}-,fa5 mi5 fa5 re5 do5 si4}
gram#18[27] T28 --> {{2,do3,la3}-,fa#5 re5 la4 la5 fa#5 re5}
gram#18[28] T29 --> {sol3_ sol2,{2,si4 re5 sol5 re5}si4}
gram#18[29] T31 --> {{2,do3,sol3}{do3,sol3},{1,mi5 do5}sol4 mi5}
gram#18[30] T32 --> {{2,do3,mi3}-,sol4 do5 mi5}
gram#18[31] T34 --> {sol3_ -,{2,mi5 do5 re5 si4} sol4}
gram#18[32] T35 --> {{2,re3,fa#3}{do3,la3},la4 re5 fa#5}
gram#18[33] T36 --> {do3 re3 re2,la4 mi5 re5 sol5 fa#5 la5}
gram#18[34] T37 --> {{2,si2,re3}-,{2,sol5 si5 sol5 re5}si4}
gram#18[35] T38 --> {{1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_}, do5 sol4 mi5}
gram#18[36] T39 --> {{3,si2 re3 sol3 re3 si2 sol2},sol5 sol4 sol4}
gram#18[37] T40 --> {{2,do3,mi3}-,do5 si4 do5 mi5 sol4 do5}
gram#18[38] T41 --> {{2,do3,mi3}-,{2,do5 si4 do5 mi5} sol4}
gram#18[39] T42 --> {sol2_ -,si4 do5 re5 si4 la4 sol4}
gram#18[40] T43 --> {{2,do3,mi3}-,sol5{2,fa5 mi5 re5 do5}}
gram#18[41] T44 --> {fa3_ sol3,la4{2,fa5 re5 la4 si4}}
gram#18[42] T45 --> {{2,mi3,sol3}-,do5 si4 do5 sol4 mi4 do4}
gram#18[43] T46 --> {{2,si2,re3}-,sol5{2,si5 sol5 re5 si4}}
gram#18[44] T47 --> {{2,si2,re3}-,sol5{1,sol5 re5}si5}
gram#18[45] T48 --> {{2,do3,sol3}{do3,mi3},mi5{2,do5 mi5 sol5 do6}}
gram#18[46] T49 --> {{1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_},mi5 do5 sol4}
gram#18[47] T50 --> {{2,mi3,sol3}-,do5{1,mi5 do5}sol4}
gram#18[48] T51 --> {{2,do3,mi3}-,do5 sol4 mi5 do5 sol5 mi5}
gram#18[49] T52 --> {fa3_ sol3,re5 do#5 re5 fa5 sol4 si4}
gram#18[50] T53 --> {do3_ -,{do5,mi5}{1,do5 re5,mi5 fa5}{mi5,sol5}}
gram#18[51] T54 --> {do3 do3 do3,{mi4,do5}{mi4,do5}{mi4,do5}}
gram#18[52] T55 --> {{2,si2,re3}-,sol5 si5 re5}
gram#18[53] T56 --> {{2,sol2,sol3}sol3,{1,re5 si4}sol4 -}
gram#18[54] T57 --> {{1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_},mi5 do5 sol4}
gram#18[55] T58 --> {{1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_},sol5 mi5 do5}
gram#18[56] T59 --> {{1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_},sol5 do5 mi5}
gram#18[57] T60 --> {{2,do3,mi3}-,sol5{2,fa5 mi5 re5 do5}}
gram#18[58] T61 --> {{2,mi3,sol3}-,do5{1,mi5 do5}sol5}
gram#18[59] T62 --> {do3 re3 re2,mi5 do5 si4 sol4 la4 fa#4}
gram#18[60] T63 --> {do3_ -,{2,mi5 do5 si4 do5} sol4}
gram#18[61] T64 --> {{2,do3,sol3}{do3,sol3},mi5 sol5 do6 sol5 mi5 do5}
gram#18[62] T65 --> {{2,re3 fa#3}-,{1,re5 la4}re5 fa#5}
gram#18[63] T66 --> {{re3,la3}{re3,fa#3}{do3,re3},fa#5 la5 fa#5}
gram#18[64] T67 --> {{2,do3,mi3}{mi3,sol3},do5 si4 do5 mi5 sol4 do5}
gram#18[65] T68 --> {si2_ -,sol5{2,si5 sol5 re5 sol5}}
gram#18[66] T69 --> {{2,do3,mi3}-,sol5 mi5 do5}
gram#18[67] T70 --> {re3_ do3,fa#5{2,la5 fa#5 re5 fa#5}}
gram#18[68] T71 --> {{2,si2,re3}{si2,re3},{2,sol5 si5 re6 si5} sol5}
gram#18[69] T72 --> {fa3_ sol3,fa5 mi5 re5 do5 si4 re5}
gram#18[70] T73 --> {{1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_},sol5 mi5 do5}
gram#18[71] T74 --> {{2,do3,mi3}-,do6 si5 do6 sol5 mi5 do5}
gram#18[72] T75 --> {do3 do3 do3,{re5,fa#5}{re5,fa#5}{re5,fa#5}}
gram#18[73] T76 --> {{2,do3,mi3}{do3,sol3},do6 si5 do6 sol5 mi5 do5}
gram#18[74] T77 --> {{2,si2,re3}{si2,sol3},{1,sol5 si5}sol5 re5}
gram#18[75] T78 --> {do3_ do2,do5 do4 -}
gram#18[76] T80 --> {do3_ -,re5 la4 fa#5}
gram#18[77] T82 --> {{2,si2,sol3}{si2,re3},{1,re5 si4}sol4 sol5}
gram#18[78] T84 --> {{2,do3,mi3}-,do5 sol4 mi5 do5 sol5 mi5}
gram#18[79] T85 --> {{2,mi3,sol3}-,do5 mi5 sol4}
gram#18[80] T86 --> {{2,si2,sol3}-,re5{1,re5 sol5}si5}
gram#18[81] T87 --> {{2,do3,mi3}{do3,sol3},sol5 do5 mi5}
gram#18[82] T88 --> {{2,si2,re3}{si2,re3},sol5 re5 sol5 si5 sol5 re5}
gram#18[83] T89 --> {{1,fa3 mi3}re3 sol3,{1,fa5 mi5}re5 sol5}
gram#18[84] T90 --> {{2,do3,la3}{do3,la3},fa#5 la5 re6 la5 fa#5 la5}
gram#18[85] T92 --> {{2,sol2,sol3}sol3,{si4,re5}{1,sol5 si5}re5}
gram#18[86] T95 --> {{2,do3,mi3}-,sol5 mi5 do5}
gram#18[87] T96 --> {do3_ -,mi5 do5 sol4}
gram#18[88] T97 --> {{2,si2,re3}{si2,sol3},sol5 fa#5 sol5 re5 si4 sol4}
gram#18[89] T98 --> {{1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_},do5 sol4 mi5}
gram#18[90] T99 --> {{2,do3,la3}{do3,la3},fa#5 la5 re5}
gram#18[91] T101 --> {{2,do3,sol3}{do3,mi3},mi5 re5 mi5 sol5 do6 sol5}
gram#18[92] T102 --> {{2,do3,la3}{do3,la3},{1,fa#5 re5}la4 fa#5}
gram#18[93] T103 --> {{2,mi3,sol3}-,{2,do5 mi5 do5 sol4} mi4}
gram#18[94] T104 --> {do3_ -,mi5 re5 mi5 sol5 do6 sol5}
gram#18[95] T105 --> {do3_ -,fa#5{2,la5 fa#5 re5 fa#5}}
gram#18[96] T106 --> {do3 re3 re2,la4{2,re5 do5 si4 la4}}
gram#18[97] T108 --> {{2,do3,sol3}{do3,mi3},mi5 sol5 do6}
gram#18[98] T109 --> {{2,fa3,la3}{sol3,re4},re5 fa5 re5 fa5 si4 re5}
gram#18[99] T110 --> {do3 re3 re2,si4 la4 la4 sol4 sol4 fa#4,re5 do5 do5 si4 si4 la4}
gram#18[100] T112 --> {{1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_},mi5 do5 sol4}
gram#18[101] T113 --> {{2,sol3,si3}-,fa5 re5 si4}
gram#18[102] T114 --> {sol3 sol3 sol3,{si4,re5}{si4,re5}{si4,re5}}
gram#18[103] T115 --> {{2,do3,mi3}-,do5 sol4 mi5 do5 sol5 mi5}
gram#18[104] T116 --> {fa3_ sol3,re5 fa5 la5 fa5 re5 si4}
gram#18[105] T117 --> {{2,re3,fa#3}-,re5 la4 re5 fa#5 la5 fa#5}
gram#18[106] T118 --> {do3 re3 re2,mi5 la5 sol5 si5 fa#5 la5}
gram#18[107] T119 --> {{2,do3,mi3}-,mi5 do5 sol5 mi5 do6 sol5}
gram#18[108] T120 --> {{2,re3,fa#3}{do3,fa#3},re6{2,la5 fa#5 re5 la4}}
gram#18[109] T121 --> {{2,si2,sol3}-,sol5{1,si5 sol5}re5}
gram#18[110] T122 --> {{si2,re3}{si2,re3}{si2,re3},{2,sol5 fa#5 sol5 si5} re5}
gram#18[111] T124 --> {do3 do3 do3,{mi4,do5}{mi4,do5}{mi4,do5}}
gram#18[112] T125 --> {sol3 sol2 -,{2,sol5 mi5 re5 si4}sol4}
gram#18[113] T126 --> {mi3_ {1,mi3 do3},do5 sol4 do5 mi5 sol5 {do5,mi5}}
gram#18[114] T128 --> {sol2_ -,si4 re5 sol5}
gram#18[115] T129 --> {{si2,re3}{si2,re3}{si2,sol3},{2,la5 sol5 fa#5 sol5}re5}
gram#18[116] T130 --> {do3 do3 do3,mi4 mi4 mi4,do5 do5 do5}
gram#18[117] T132 --> {sol3 sol2 -,{do5,mi5}{1,si4 sol4,re5 si4}sol4}
gram#18[118] T133 --> {{2,si2,sol3}-,re5{2,sol5 re5 si4 re5}}
gram#18[119] T134 --> {do3 re3 re2,la4 mi5{si4,re5}{la4,do5}{sol4,si4}{fa#4,la4}}
gram#18[120] T135 --> {{do3,re3}{do3,re3}{do3,re3},fa#5{1,fa#5 re5}la5}
gram#18[121] T136 --> {{2,do3,mi3}-,do6 si5 do6 sol5 mi5 do5}
gram#18[122] T137 --> {{1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_},do5 sol4 mi5}
gram#18[123] T138 --> {{3,re2 re3 do#3 re3 do3 re3},{la4,re5,fa#5}fa#5_}
gram#18[124] T139 --> {si2_ -,{2,sol5 si5 sol5 si5}re5}
gram#18[125] T140 --> {{do3,fa#3}{do3,fa#3}{do3,la3},la4{1,la4 re5}fa#5}
gram#18[126] T141 --> {{2,si2,sol3}sol2,re5 mi5 fa5 re5 do5 si4}
gram#18[127] T142 --> {{2,do3,mi3}-,do5 sol4 mi5}
gram#18[128] T143 --> {{2,si2,re3}{si2,re3},sol5{1,re5 si4}sol4}
gram#18[129] T144 --> {{1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_},sol5 do5 mi5}
gram#18[130] T145 --> {fa3_ sol3,re5 fa5 la4 re5 si4 re5}
gram#18[131] T146 --> {do3 do3 do3,{fa#4,re5}{re5,fa#5}{fa#5,la5}}
gram#18[132] T147 --> {do3 re3 re2,mi5 do6 si5 sol5 la5 fa#5}
gram#18[133] T148 --> {{2,do3,mi3}-,do6 si5 do6 sol5 mi5 do5}
gram#18[134] T149 --> {fa3_ sol3,{1,fa5 re5}la4 si4}
gram#18[135] T150 --> {{3,do3 si2 do3 re3 mi3 fa#3},{sol4,do5,mi5}mi5_}
gram#18[136] T152 --> {{2,do3,mi3}-,sol5{2,fa5 mi5 re5 do5}}
gram#18[137] T153 --> {do3_ -,re5 la4 fa#5 re5 la5 fa#5}
gram#18[138] T154 --> {do3_ -,re5 do#5 re5 fa#5 la5 fa#5}
gram#18[139] T155 --> {{2,si2,re3}-,sol5 si5 sol5 re5 si4 sol4}
gram#18[140] T156 --> {{2,mi3,sol3}-,{2,do5 sol4 mi5 do5} sol5}
gram#18[141] T157 --> {do3_ -,mi5 re5 mi5 sol5 do6 sol5}
gram#18[142] T158 --> {sol2_ -,si4{2,re5 si4 la4 sol4}}
gram#18[143] T159 --> {do3 re3 re2,mi5 sol5 re5 do5 si4 la4}
gram#18[144] T160 --> {{2,do3,mi3}{do3,mi3},do5 si4 do5 mi5 sol4 do5}
gram#18[145] T161 --> {do3 do3 do3,{fa#4,re5}{fa#4,re5}{fa#4,re5}}
gram#18[146] T162 --> {{2,do3,sol3}{do3,mi3},mi5 re5 mi5 sol5 do6 sol5}
gram#18[147] T163 --> {{2,si2,re3}-,sol5 fa#5 sol5 re5 si4 sol4}
gram#18[148] T164 --> {{3,sol3 fa#3 sol3 re3 si2 sol3},re5 sol4_}
gram#18[149] T165 --> {si2_ -,re5 si4 sol4}
gram#18[150] T166 --> {{2,sol3,si3}-,{2,re5 si5 sol5 re5}si4}
gram#18[151] T167 --> {{2,do3,mi3}-,do5{1,do5 re5}mi5}
gram#18[152] T168 --> {{2,do3,mi3}{mi3,sol3},sol5{2,fa5 mi5 re5 do5}}
gram#18[153] T169 --> {do3 re3 re3,mi5 sol5 re5 sol5 la4 fa#5}
gram#18[154] T171 --> {{2,sol2,sol3}{si2,sol3},si4 do5 re5 mi5 fa5 re5}
gram#18[155] T173 --> {fa3_ sol3,{1,fa5 la5}la4{1,si4 re5}}
gram#18[156] T174 --> {{1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_} {1,{do3,mi3}sol3_},sol4 do5 mi5}
gram#18[157] T175 --> {sol3 sol2 -,{2,mi5 do5 si4 re5}sol5}
gram#18[158] T176 --> {{2,si2,re3}{si2,re3},la5 sol5 si5 sol5 re5 sol5}
COMMENT:
This is Mozart's musical dice game…
[Source: B. Schott's Söhne, Mainz 39542]
Subgrammars #1 to #17 rewrite the work string — initially "S" — as strings of variables "A1", "A2", "B1", "T96" etc. The numbers of the "T-variables" are taken from tables in the game.
The pictures show self-explanatory pianoroll and sound-object displays of the polymetric expression produced by "T162":
When we captured notes from a MIDI keyboard to construct the rules for subgrammar #18, we had the Bol Processor set up incorrectly due to confusion over octave numbering in the English and French conventions.
In English, the "middle C" on a piano keyboard is called "C4" and its number is 60. In French, the key with the same number is called "do3". When we mistakenly called it "do4", all the notes were written an octave higher…
After fixing the problem on BP2, there were two ways to correct the octave shift:
We believe that the second solution makes more sense because it is based on a universal standard of key numbering.
Both solutions have the same corrective effect on the Csound score: only note names will change, for example "mi5" is replaced with "mi4" but both octave point pitch-class notations remain "9.04".
However, this diapason setting has no effect on the tonality of pieces produced by "-gr.Mozart" in MIDI format. The real-time MIDI stream or MIDI file will be played by MIDI devices — such as the MIDIjs javascript player — using their own default setting of "A4".
In the Bol Processor BP2, the frequency of "A4" also had no effect on the Csound output. In the orchestra file "default.orc", the oscillator parameter kpitch was derived from the octave point pitch-class parameter p4 via the function cpspch() also using the default 440 Hz diapason = cpspch(8.09) — see documentation. This has been changed in BP3, using an updated version of "default.orc". See Csound tuning in BP3 for more details.