max v2; #N vpatcher 15 55 1505 1069; #P origin 0 14; #P window setfont "Sans Serif" 9.; #P newex 144 485 27 9109513 + 55; #P button 141 49 15 0; #P message 162 48 28 9109513 stop; #P button 229 51 15 0; #P message 259 49 28 9109513 stop; #P window setfont "Sans Serif" 20.; #P comment 602 62 260 9109524 Night-Piece \, rev. A; #P window setfont "Sans Serif" 18.; #P comment 601 96 260 9109522 Matt Slaybaugh Final \, Spring 2004 Digital Sound Workshop & MIDI; #P window setfont "Sans Serif" 12.; #P comment 601 174 259 9109516 An experiment in automated predictive music \, based on Chopin's "Nocturne" (don't know the number \, the famous one); #P window setfont "Fixedwidth Serif" 10.; #P message 1047 615 14 9240586 9; #P message 1024 614 20 9240586 11; #P window setfont "Sans Serif" 9.; #P newex 1024 588 48 9109513 select 0 1; #B color 5; #P window setfont "Fixedwidth Serif" 10.; #P newex 1024 564 53 9240586 random 2; #P button 1024 544 15 0; #P window setfont "Sans Serif" 12.; #P comment 1050 534 100 9109516 C to A or B; #P window setfont "Fixedwidth Serif" 10.; #P message 990 615 14 9240586 7; #P message 971 616 14 9240586 3; #P message 954 616 14 9240586 5; #P message 934 615 14 9240586 0; #P message 910 614 14 9240586 8; #P message 887 614 20 9240586 10; #P window setfont "Sans Serif" 9.; #P newex 887 589 118 9109513 select 0 1 2 3 4 5 6 7; #B color 5; #P window setfont "Fixedwidth Serif" 10.; #P newex 887 565 53 9240586 random 7; #P message 775 614 20 9240586 10; #P message 756 615 14 9240586 2; #P window setfont "Sans Serif" 9.; #P newex 756 589 48 9109513 select 0 1; #B color 5; #P window setfont "Fixedwidth Serif" 10.; #P newex 756 565 53 9240586 random 2; #P message 692 611 14 9240586 9; #P message 670 610 14 9240586 0; #P message 638 611 14 9240586 7; #P window setfont "Sans Serif" 9.; #P newex 625 586 92 9109513 select 0 1 2 3 4 5; #B color 5; #P window setfont "Fixedwidth Serif" 10.; #P newex 625 562 53 9240586 random 6; #P button 625 542 15 0; #P message 591 611 20 9240586 10; #P message 569 610 14 9240586 1; #P window setfont "Sans Serif" 9.; #P newex 565 585 48 9109513 select 0 1; #B color 5; #P window setfont "Fixedwidth Serif" 10.; #P newex 565 561 53 9240586 random 2; #P button 565 541 15 0; #P message 536 611 14 9240586 7; #P message 520 611 14 9240586 4; #P message 498 610 20 9240586 10; #P window setfont "Sans Serif" 9.; #P newex 494 585 66 9109513 select 0 1 2 3; #B color 5; #P window setfont "Fixedwidth Serif" 10.; #P newex 494 561 53 9240586 random 4; #P message 461 610 14 9240586 4; #P message 438 610 20 9240586 10; #P message 404 610 14 9240586 9; #P window setfont "Sans Serif" 9.; #P newex 383 584 105 9109513 select 0 1 2 3 4 5 6; #B color 5; #P window setfont "Fixedwidth Serif" 10.; #P newex 383 560 53 9240586 random 7; #P button 887 537 15 0; #P button 756 545 15 0; #P message 1162 575 14 9240586 1; #P message 724 586 14 9240586 8; #P window setfont "Sans Serif" 9.; #P newex 825 395 118 9109513 select 0 2 4 5 6 7 9 10; #B color 5; #P button 383 539 15 0; #P button 494 541 15 0; #P number 1163 533 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; #P button 723 564 15 0; #P button 1163 551 15 0; #P window setfont "Sans Serif" 12.; #P comment 388 278 100 9109516 Use Accumulate object to store data recursively; #P comment 21 48 100 9109516 Three tones: long low bass matching pitch two octaves lower than melodic line - mid-range a 5th below melody - And faster melodic line; #P number 257 326 57 12 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; #P number 793 713 35 12 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Sans Serif" 9.; #P number 24 510 36 9 0 0 256 139 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Fixedwidth Serif" 10.; #P newex 24 535 109 9240586 makenote 127 2000; #P newex 24 562 73 9240586 noteout a 1; #P window setfont "Sans Serif" 9.; #P number 144 516 32 9 0 0 256 139 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Fixedwidth Serif" 10.; #P newex 144 537 109 9240586 makenote 127 1000; #P newex 144 564 73 9240586 noteout a 1; #P window setfont "Sans Serif" 9.; #P number 263 511 32 9 0 0 256 139 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Fixedwidth Serif" 10.; #P newex 263 537 103 9240586 makenote 127 500; #P newex 263 564 73 9240586 noteout a 1; #P window setfont "Sans Serif" 12.; #P number 331 337 35 12 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Fixedwidth Serif" 10.; #P newex 331 308 31 9240586 % 12; #P newex 332 280 44 9240586 accum; #B color 5; #P window setfont "Sans Serif" 9.; #P newex 24 476 27 9109513 + 36; #P newex 151 152 27 9109513 + 3; #P newex 151 81 49 9109513 metro 900; #B color 5; #P button 151 104 15 0; #P newex 130 221 31 9109513 metro; #B color 5; #P button 130 250 15 0; #P newex 151 176 29 9109513 * 600; #P number 151 201 33 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Fixedwidth Serif" 10.; #P newex 151 127 53 9240586 random 2; #P window setfont "Sans Serif" 9.; #P newex 250 155 27 9109513 + 2; #P newex 250 84 49 9109513 metro 900; #B color 5; #P button 250 107 15 0; #P newex 229 224 31 9109513 metro; #B color 5; #P button 229 253 15 0; #P newex 250 179 29 9109513 * 500; #P number 250 204 33 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Fixedwidth Serif" 10.; #P newex 250 130 53 9240586 random 3; #P window setfont "Sans Serif" 9.; #P newex 263 483 27 9109513 + 72; #P newex 337 154 27 9109513 + 1; #P newex 337 83 49 9109513 metro 900; #B color 5; #P button 337 106 15 0; #P button 316 53 15 0; #P newex 316 223 31 9109513 metro; #B color 5; #P message 337 52 28 9109513 stop; #P button 316 252 15 0; #P newex 337 178 29 9109513 * 400; #P number 337 203 33 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Fixedwidth Serif" 10.; #P newex 337 129 53 9240586 random 4; #P window setfont "Sans Serif" 12.; #P comment 408 53 100 9109516 Change duration of note once every 0.9 seconds; #P comment 410 131 100 9109516 4 lengths of note: 300 \, 600 \, 900 \, and 1200; #P comment 309 21 100 9109516 start \, stop; #P comment 285 591 55 9109516 melody; #P comment 140 589 88 9109516 harmony \, one octave down \, one 5th above; #P comment 853 312 100 9109516 8 possible notes: D E F# G G# A B C; #P comment 15 592 100 9109516 bass \, two octaves down; #P comment 838 714 100 9109516 next interval; #P comment 1119 475 100 9109516 failsafe for bad arithmetic: add 1; #P comment 375 494 100 9109516 D to B \, C \, or F#; #P comment 486 460 100 9109516 E to D \, G# \, or B; #P comment 559 423 100 9109516 F# to G or E; #P comment 628 396 100 9109516 G to D \, G \, or E; #P comment 685 530 53 9109516 G# to E; #P comment 781 535 100 9109516 A to B or G; #P comment 913 521 100 9109516 B to A \, G \, B \, E \, D \, or F#; #P fasten 46 0 43 0 336 390 29 390; #P fasten 38 0 43 0 135 371 29 371; #P connect 43 0 55 0; #P connect 55 0 54 0; #P connect 54 0 53 0; #P fasten 54 1 53 1 128 558 60 558; #P fasten 114 0 39 0 167 72 135 72; #P fasten 115 0 39 0 146 71 135 71; #P connect 39 0 38 0; #P fasten 46 0 116 0 336 390 149 390; #P fasten 30 0 116 0 234 376 149 376; #P connect 116 0 52 0; #P connect 52 0 51 0; #P connect 51 0 50 0; #P fasten 114 0 41 0 167 73 156 73; #P fasten 115 0 41 0 146 72 156 72; #P connect 41 0 40 0; #P connect 40 0 35 0; #P connect 35 0 42 0; #P connect 42 0 37 0; #P connect 37 0 36 0; #P connect 36 0 39 1; #P fasten 51 1 50 1 248 560 180 560; #P fasten 112 0 31 0 264 75 234 75; #P fasten 113 0 31 0 234 144 234 144; #P connect 31 0 30 0; #P fasten 112 0 33 0 264 75 255 75; #P fasten 113 0 33 0 234 75 255 75; #P connect 33 0 32 0; #P connect 32 0 27 0; #P connect 27 0 34 0; #P connect 34 0 29 0; #P connect 29 0 28 0; #P connect 28 0 31 1; #P connect 44 0 57 0; #P fasten 46 0 26 0 336 372 268 372; #P connect 26 0 49 0; #P connect 49 0 48 0; #P connect 48 0 47 0; #P fasten 48 1 47 1 361 560 299 560; #P fasten 20 0 21 0 342 74 321 74; #P fasten 22 0 21 0 321 211 321 211; #P connect 21 0 19 0; #P connect 44 0 45 0; #P connect 45 0 46 0; #P connect 19 0 44 0; #P fasten 20 0 24 0 342 76 342 76; #P fasten 22 0 24 0 321 74 342 74; #P connect 24 0 23 0; #P connect 23 0 16 0; #P connect 16 0 25 0; #P connect 25 0 18 0; #P connect 18 0 17 0; #P connect 17 0 21 1; #P fasten 56 0 44 1 1225 578 1229 471 441 263 354 263; #P connect 65 0 64 0; #P connect 64 0 70 0; #P connect 70 0 71 0; #P connect 71 0 72 0; #P connect 71 1 72 0; #P connect 71 2 72 0; #P connect 71 3 72 0; #P connect 71 4 73 0; #P connect 71 5 73 0; #P connect 71 6 74 0; #P connect 65 1 63 0; #P connect 63 0 75 0; #P connect 75 0 76 0; #P connect 76 0 77 0; #P connect 76 1 77 0; #P connect 76 2 78 0; #P connect 76 3 79 0; #P connect 65 2 80 0; #P connect 80 0 81 0; #P connect 81 0 82 0; #P connect 82 0 83 0; #P connect 82 1 83 0; #P connect 82 2 84 0; #P connect 65 3 85 0; #P connect 85 0 86 0; #P connect 86 0 87 0; #P connect 87 0 88 0; #P connect 87 1 88 0; #P connect 87 2 88 0; #P connect 87 3 89 0; #P connect 87 4 89 0; #P connect 87 5 90 0; #P connect 65 4 61 0; #P connect 61 0 66 0; #P connect 65 5 68 0; #P connect 68 0 91 0; #P connect 91 0 92 0; #P connect 92 0 93 0; #P connect 92 1 94 0; #P connect 66 0 56 0; #P connect 67 0 56 0; #P connect 72 0 56 0; #P connect 73 0 56 0; #P connect 74 0 56 0; #P connect 77 0 56 0; #P connect 78 0 56 0; #P connect 79 0 56 0; #P connect 83 0 56 0; #P connect 84 0 56 0; #P connect 88 0 56 0; #P connect 89 0 56 0; #P connect 90 0 56 0; #P connect 93 0 56 0; #P connect 94 0 56 0; #P connect 97 0 56 0; #P connect 98 0 56 0; #P connect 99 0 56 0; #P connect 100 0 56 0; #P connect 101 0 56 0; #P connect 102 0 56 0; #P connect 107 0 56 0; #P connect 108 0 56 0; #P fasten 46 0 65 0 336 378 830 378; #P connect 65 6 69 0; #P connect 69 0 95 0; #P connect 95 0 96 0; #P connect 96 1 97 0; #P connect 96 0 97 0; #P connect 96 3 98 0; #P connect 96 2 98 0; #P connect 96 4 99 0; #P connect 96 5 100 0; #P connect 96 6 101 0; #P connect 96 7 102 0; #P connect 65 7 104 0; #P connect 104 0 105 0; #P connect 105 0 106 0; #P connect 106 0 107 0; #P connect 106 1 108 0; #P connect 60 0 67 0; #P connect 65 8 62 0; #P connect 62 0 60 0; #P pop;