max v2; #N vpatcher 158 63 1051 785; #P origin 0 514; #P window setfont "American Typewriter" 14.; #P window linecount 2; #P comment 263 659 91 199491598 Being wondrous...; #P outlet 209 864 15 0; #P window setfont "Sans Serif" 9.; #P number 113 702 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P inlet 87 655 15 0; #P window linecount 1; #P newex 182 777 93 196617 expr ($i1 * 3) + 1; #P number 209 830 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 86 777 65 196617 expr $i1 / 2; #P newex 86 742 192 196617 if ($i1 % 2) == 0 then $i1 else out2 $i1; #P number 198 642 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 199 545 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 198 579 52 196617 wondrous; #P window setfont "American Typewriter" 14.; #P window linecount 2; #P comment 666 775 63 199491598 Make a chord...; #P window setfont "Sans Serif" 9.; #P window linecount 1; #P newex 538 837 27 196617 + 3; #P window setfont "Fixedwidth Serif" 10.; #P newex 578 817 27 1441802 + 4; #P button 553 790 15 0; #P window setfont "Sans Serif" 9.; #P newex 745 730 57 196617 pgmout 1; #B color 5; #P number 745 706 28 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P slider 745 566 15 128 0 1; #P window setfont "Fixedwidth Serif" 10.; #P number 665 600 32 10 0 127 3 22 0 0 0 221 221 221 222 222 222 0 0 0; #P button 816 645 18 0; #P window setfont "Sans Serif" 9.; #P newex 816 667 36 196617 flush; #B color 5; #P window setfont "Fixedwidth Serif" 10.; #P number 624 600 32 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 624 577 32 1441802 key; #B color 5; #P window setfont "Sans Serif" 9.; #P newex 624 685 92 196617 makenote 80 1000; #P newex 624 730 46 196617 noteout; #P message 624 665 26 196617 60; #P number 535 872 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Fixedwidth Serif" 10.; #P number 375 346 32 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 375 323 32 1441802 key; #B color 5; #P button 555 372 18 0; #P window setfont "Sans Serif" 9.; #P newex 555 394 36 196617 flush; #B color 5; #P window setfont "Fixedwidth Serif" 10.; #P number 274 355 32 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 274 332 32 1441802 key; #B color 5; #P window setfont "Sans Serif" 9.; #P newex 320 403 92 196617 makenote 80 1000; #P newex 320 448 46 196617 noteout; #P message 320 383 26 196617 60; #P window setfont "American Typewriter" 14.; #P comment 628 -332 53 199491598 Flush; #P button 497 -351 29 0; #P window setfont "Sans Serif" 9.; #P window linecount 5; #P comment 497 -419 45 196617 bang tells flush to turn the notes off; #P window linecount 1; #P newex 554 -258 63 196617 noteout; #P newex 554 -296 36 196617 flush; #B color 5; #P message 554 -331 41 196617 \$1 64; #P window linecount 3; #P comment 576 -437 100 196617 Move the slider up and down to play a few hanging notes; #P window linecount 1; #P newex 554 -357 35 196617 + 36; #P slider 554 -438 15 64 0 1; #P newex 648 -79 31 196617 flush; #P window setfont "American Typewriter" 14.; #P comment 55 -114 80 199491598 MakeNote; #P window linecount 2; #P comment 564 146 107 199491598 Using the Mac Keyboard; #P window setfont "American Typewriter" 18.; #P window linecount 1; #P comment 366 -467 70 199491602 MIDI; #P window setfont "Fixedwidth Serif" 10.; #P message 307 219 15 1441802 0; #P newex 399 62 47 1441802 numkey; #B color 5; #P number 436 85 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P number 399 85 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 399 104 68 1441802 pgmout a 1; #P window setfont Times 10.; #P window linecount 3; #P comment 474 76 71 1310730 number is shown here as it is being typed; #P window setfont Times 12.; #P window linecount 1; #P comment 454 53 37 1310732 Part B; #P comment 182 53 37 1310732 Part A; #P window setfont Times 10.; #P comment 79 158 56 1310730 gate number; #P window linecount 3; #P comment 228 90 62 1310730 all other keys are sent out here; #P window setfont "Fixedwidth Serif" 10.; #P number 215 130 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont Times 10.; #P comment 67 95 68 1310730 keys 120 to 122 (x to z) are sent out here; #P window setfont "Fixedwidth Serif" 10.; #P number 140 157 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P window linecount 1; #P newex 140 135 44 1441802 - 120; #P number 140 116 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 140 95 85 1441802 split 120 122; #P number 140 76 32 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 140 53 32 1441802 key; #B color 5; #P newex 180 157 68 1441802 notein a 1; #P newex 140 179 50 1441802 gate 2; #P newex 140 201 31 1441802 - 12; #P newex 180 201 31 1441802 + 12; #P button 119 202 15 0; #P newex 389 279 78 1441802 noteout a 1; #P message 307 271 18 1441802 96; #P newex 389 254 78 1441802 makenote 64; #P newex 457 229 28 1441802 / 2; #P newex 307 250 38 1441802 metro; #P newex 376 157 36 1441802 keyup; #B color 5; #P newex 376 180 48 1441802 sel 116; #P newex 307 180 66 1441802 sel 46 116; #P window setfont Times 12.; #P comment 328 157 37 1310732 Part C; #P window setfont "Fixedwidth Serif" 10.; #P newex 180 265 74 1441802 noteout a 1; #P newex 180 238 68 1441802 flush; #P window setfont Times 10.; #P window linecount 3; #P comment 316 76 80 1310730 number is sent out here when Return or Enter is typed; #P window linecount 4; #P comment 425 154 98 1310730 letter "t" sets tempo (by how long it is held down) and starts metro \; period (.) stops metro; #P window setfont "Fixedwidth Serif" 10.; #P window linecount 1; #P newex 335 203 51 1441802 timer; #P number 335 225 51 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Sans Serif" 9.; #P window linecount 3; #P comment 480 -189 90 196617 arguments: 2 ints \; inlets: int \; outlets: int; #P number 262 -66 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P button 262 -47 15 0; #P window linecount 1; #P newex 262 -92 116 196617 makenote 60 1000; #B color 5; #P button 368 -47 15 0; #P number 368 -66 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P comment 324 -64 42 196617 Velocity; #P newex 368 -132 28 196617 * 40; #P number 368 -112 33 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P slider 368 -194 16 51 0 1; #P window linecount 3; #P comment 387 -201 77 196617 int in right sets duration in miliseconds.; #P number 315 -112 23 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P slider 315 -173 16 51 0 1; #P window linecount 2; #P comment 283 -201 78 196617 int in middle sets velocity; #P slider 262 -173 16 51 0 1; #P number 262 -112 23 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P window linecount 1; #P comment 200 -29 275 196617 Typically \, you connect the output of makenote to noteout; #P comment 232 -65 28 196617 Pitch; #P message 413 -140 32 196617 clear; #P comment 445 -139 114 196617 Cancel future note-offs; #P comment 445 -115 125 196617 Send all note-offs out now; #P window linecount 2; #P comment 381 -91 145 196617 optional arguments to initialize velocity and duration; #P window linecount 1; #P message 413 -116 30 196617 stop; #P window linecount 9; #P comment 190 -201 70 196617 int in left sets pitch and starts a note. The note-on comes out immediately \, followed by a delayed note-off; #P window linecount 1; #P newex 58 -268 66 196617 outport.help; #P window linecount 2; #P comment 255 -315 143 196617 optional argument to initialize channel number; #P window linecount 4; #P comment 214 -469 85 196617 int in left inlet sends a program change message to a MIDI device; #P window linecount 2; #P comment 263 -370 136 196617 int in right inlet sets MIDI channel; #P slider 241 -383 17 33 0 1; #P number 241 -336 30 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P window linecount 1; #P newex 194 -312 57 196617 pgmout 1; #B color 5; #P number 194 -336 28 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P slider 194 -476 15 128 0 1; #P newex 41 -396 92 196617 makenote 80 1000; #P newex 41 -351 46 196617 noteout; #P message 41 -416 26 196617 60; #P connect 0 0 2 0; #P connect 2 0 1 0; #P connect 2 1 1 1; #P fasten 120 0 115 0 118 731 91 731; #P connect 115 0 116 0; #P fasten 119 0 120 0 92 695 118 695; #P fasten 61 0 51 0 145 176 124 176; #P connect 56 0 57 0; #P connect 57 0 58 0; #P connect 58 0 59 0; #P connect 59 0 60 0; #P connect 60 0 61 0; #P connect 61 0 54 0; #P connect 54 0 53 0; #P connect 55 0 54 1; #P connect 54 1 52 0; #P fasten 53 0 40 0 145 224 185 224; #P connect 52 0 40 0; #P fasten 51 0 40 0 124 231 185 231; #P connect 40 0 41 0; #P fasten 115 1 118 0 273 768 187 768; #P connect 3 0 4 0; #P connect 4 0 5 0; #P connect 113 0 112 0; #P connect 112 0 114 0; #P fasten 118 0 117 0 187 816 214 816; #P fasten 116 0 117 0 91 815 214 815; #P connect 117 0 121 0; #P fasten 40 1 41 1 243 261 217 261; #P connect 58 1 63 0; #P connect 55 1 40 1; #P connect 7 0 6 0; #P connect 6 0 5 1; #P connect 21 0 20 0; #P fasten 13 0 32 0 418 -94 267 -94; #P fasten 17 0 32 0 418 -120 408 -120 408 -94 267 -94; #P connect 20 0 32 0; #P connect 32 0 34 0; #P connect 34 0 33 0; #P connect 90 0 91 0; #P fasten 63 0 43 0 220 153 312 153; #P connect 43 0 73 0; #P connect 44 0 46 0; #P connect 73 0 46 0; #P connect 46 0 49 0; #P connect 23 0 24 0; #P connect 24 0 32 1; #P connect 87 0 89 0; #P connect 91 0 89 0; #P hidden connect 34 0 89 0; #P connect 89 0 88 0; #P fasten 92 0 88 0 560 432 325 432; #P connect 43 1 37 0; #P connect 37 0 36 0; #P connect 36 0 46 1; #P connect 89 1 88 1; #P fasten 92 1 88 1 586 436 343 436; #P hidden connect 30 0 89 1; #P fasten 95 0 89 1 395 385; #P connect 26 0 28 0; #P connect 28 0 27 0; #P connect 27 0 32 2; #P connect 32 1 30 0; #P connect 30 0 31 0; #P connect 94 0 95 0; #P connect 45 0 44 0; #P connect 44 0 37 1; #P fasten 49 0 48 0 312 290 384 290 384 251 394 251; #P connect 48 0 50 0; #P fasten 63 0 72 0 220 148 312 148 312 57 404 57; #P connect 72 0 70 0; #P connect 70 0 69 0; #P fasten 48 1 50 1 462 275 428 275; #P connect 72 1 71 0; #P fasten 36 0 47 0 340 243 450 243 450 225 462 225; #P connect 47 0 48 2; #P connect 110 0 96 0; #P connect 109 0 110 0; #P connect 101 0 108 0; #P connect 78 0 79 0; #P connect 79 0 81 0; #P connect 85 0 82 0; #P connect 81 0 82 0; #P connect 82 0 83 0; #P connect 93 0 92 0; #P fasten 101 0 109 0 563 684; #P connect 82 1 83 1; #P connect 100 0 101 0; #P connect 97 0 99 0; #P connect 101 0 99 0; #P connect 109 0 99 0; #P connect 110 0 99 0; #P connect 99 0 98 0; #P hidden fasten 102 0 98 0 821 714 629 714; #P fasten 99 1 98 1 711 723 647 723; #P hidden fasten 102 1 98 1 847 718 647 718; #P connect 104 0 99 1; #P connect 105 0 106 0; #P connect 106 0 107 0; #P connect 103 0 102 0; #P pop;