max v2; #N vpatcher 10 59 764 652; #P window setfont Times 18.; #P comment 396 94 222 1310738 milliseconds between triggers; #P comment 29 93 204 1310738 1/0 (on/off) for metronome; #P window linecount 2; #P comment 307 309 88 1310738 cosine tone generator; #P window linecount 5; #P comment 565 250 96 1310738 Use it as a MIDI pitch number \, and convert it to frequency; #P window linecount 1; #P comment 509 219 96 1310738 Add 60 to it; #P window linecount 2; #P comment 504 155 160 1310738 Choose a random number from 0 to 24; #P window linecount 1; #P comment 425 538 53 1310738 sound; #P comment 79 374 123 1310738 control function; #P user scope~ 77 244 207 374 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0; #P user scope~ 382 407 512 537 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0; #P window linecount 2; #P comment 99 154 133 1310738 Go to 1 in 10 ms \, go to 0 in 90 ms; #P window linecount 1; #P comment 265 362 238 1310738 Impose an amplitude envelope; #P comment 185 503 108 1310738 Audio On/Off; #P window setfont "Fixedwidth Serif" 18.; #P flonum 467 289 97 18 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P number 467 242 41 18 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P number 467 197 41 18 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P user ezdac~ 216 469 260 502 0; #P newex 233 359 32 1441810 *~; #P newex 395 254 54 1441810 mtof; #P newex 395 207 54 1441810 + 60; #P newex 395 162 109 1441810 random 25; #P newex 395 320 76 1441810 cycle~; #P newex 233 202 65 1441810 line~; #P toggle 233 97 15 0; #P number 332 92 64 18 0 0 1 22 0 0 0 221 221 221 222 222 222 0 0 0; #P message 233 163 109 1441810 1 10 0 90; #P newex 233 121 109 1441810 metro 250; #P window setfont Times 18.; #P comment 231 31 280 1310738 Play random notes with a cosine tone; #P fasten 5 0 19 0 238 230 82 230; #P connect 10 0 11 0; #P connect 4 0 1 0; #P connect 1 0 2 0; #P connect 2 0 5 0; #P connect 5 0 10 0; #P connect 10 0 11 1; #P fasten 6 0 10 1 400 352 260 352; #P connect 3 0 1 1; #P fasten 10 0 18 0 238 387 387 387; #P fasten 1 0 7 0 238 151 400 151; #P connect 7 0 8 0; #P connect 8 0 9 0; #P connect 9 0 6 0; #P connect 7 0 12 0; #P connect 8 0 13 0; #P connect 9 0 14 0; #P pop;