2009年6月20日 星期六

「隨機節奏器」程式碼

下面這個程式碼轉貼自 cycling74 的網站討論區,
將亂數經過篩選,透過音效卡本身的鼓組音色,轉成不斷改變的節奏。
對「準則作曲」有興趣的人,可以參考一下。

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 364 134 147 9109513 <- refresh seed randomly;
#P newex 22 157 27 9109513 t b b;
#P hidden newex 528 40 56 9109513 loadmess 1;
#P comment 38 28 54 9109513 badaboom!;
#P comment 435 154 147 9109513 <- 0 is equivalent to no seed;
#P hidden message 546 101 14 9109513 1;
#P number 187 208 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 218 134 23 9109513 128;
#P message 198 134 18 9109513 64;
#P message 178 134 18 9109513 32;
#P message 158 134 18 9109513 16;
#P comment 418 188 147 9109513 <- here is a the seed;
#P window linecount 2;
#P comment 62 91 147 9109513 <- your loop protocol still works and shortcuts the other method;
#P window linecount 1;
#P comment 633 86 147 9109513 try the presets;
#P number 102 47 35 9 0 0 0 139 0 0 0 255 92 174 222 222 222 0 0 0;
#P message 415 153 14 9109513 0;
#P number 206 159 35 9 0 0 0 139 0 0 0 255 92 174 222 222 222 0 0 0;
#P message 93 134 14 9109513 1;
#P message 141 134 14 9109513 8;
#P message 125 134 14 9109513 4;
#P message 109 134 14 9109513 2;
#P newex 327 209 27 9109513 i;
#P newex 175 229 28 9109513 sel 1;
#N counter 1 4;
#X flags 0 0;
#P newobj 175 183 66 9109513 counter 1 4;
#P button 327 188 15 0;
#P number 344 188 71 9 0 0 0 139 0 0 0 255 92 174 222 222 222 0 0 0;
#P newex 327 306 264 9109513 cycle 6;
#P newex 327 231 27 9109513 t b i;
#P newex 327 258 40 9109513 uzi 6;
#P message 373 259 41 9109513 seed \$1;
#P newex 327 284 57 9109513 random 256;
#P button 344 134 15 0;
#P newex 344 152 67 9109513 random 10000;
#P number 598 410 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 548 410 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 498 410 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 448 410 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 398 410 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 348 410 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 1 16;
#X flags 0 0;
#P newobj 130 535 68 9109513 counter 1 16;
#P newex 219 345 40 9109513 t b 1 0;
#P newex 214 477 28 9109513 sel 1;
#P toggle 218 395 15 0;
#P newex 218 415 42 9109513 gate 1 0;
#P newex 22 107 27 9109513 + 1;
#P toggle 22 88 15 0;
#P newex 22 130 42 9109513 gate 2 1;
#P newex 277 545 94 9109513 unpack 0 0 0 0 0 0;
#P newex 794 600 32 9109513 sel 1;
#P newex 758 600 32 9109513 sel 1;
#P newex 722 600 32 9109513 sel 1;
#P newex 686 600 32 9109513 sel 1;
#P newex 650 600 32 9109513 sel 1;
#P newex 614 600 32 9109513 sel 1;
#P message 794 622 20 9109513 69;
#P message 758 622 20 9109513 53;
#P message 722 622 20 9109513 51;
#P message 686 622 20 9109513 42;
#P message 650 622 20 9109513 38;
#P message 614 622 20 9109513 35;
#P newex 614 649 94 9109513 makenote 100 100;
#P newex 614 676 97 9109513 noteout 10;
#P message 261 415 14 9109513 1;
#N coll ;
#P newobj 277 524 53 9109513 coll;
#N counter 1 16;
#X flags 0 0;
#P newobj 218 445 68 9109513 counter 1 16;
#P newex 310 388 27 9109513 t b i;
#P newex 277 472 315 9109513 pack 0 0 0 0 0 0 0;
#P toggle 577 358 15 0;
#P toggle 527 358 15 0;
#P newex 527 336 42 9109513 <= 127;
#P toggle 477 358 15 0;
#P newex 477 336 42 9109513 <= 100;
#P toggle 427 358 15 0;
#P newex 427 336 42 9109513 <= 160;
#P toggle 377 358 15 0;
#P newex 377 336 42 9109513 <= 100;
#P toggle 327 358 15 0;
#P newex 327 336 42 9109513 <= 100;
#P toggle 54 46 15 0;
#P newex 54 69 58 9109513 metro 125;
#P newex 577 336 42 9109513 <= 127;
#N vpreset 8;
#X append 1 1 58 188 344 number int 9712 \; 67 159 206 number int 16 \; 69 47 102 number int 176 \;;
#X append 2 1 58 188 344 number int 1952 \; 67 159 206 number int 32 \; 69 47 102 number int 176 \;;
#X append 3 1 58 188 344 number int 5838 \; 67 159 206 number int 4 \; 69 47 102 number int 176 \;;
#X append 4 1 58 188 344 number int 9712 \; 67 159 206 number int 8 \; 69 47 102 number int 255 \;;
#X append 5 1 58 188 344 number int 9712 \; 67 159 206 number int 64 \; 69 47 102 number int 30 \;;
#X append 6 1 58 188 344 number int 2810 \; 67 159 206 number int 8 \; 69 47 102 number int 100 \;;
#X append 7 1 58 188 344 number int 2810 \; 67 159 206 number int 1 \; 69 47 102 number int 100 \;;
#X append 8 1 58 188 344 number int 2810 \; 67 159 206 number int 2 \; 69 47 102 number int 100 \;;
#P preset 528 68 47 27;
#P comment 633 66 147 9109513 the significant values are in pink;
#P user panel 604 55 207 59;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P fasten 43 1 38 0 239 367 9 367 9 81 27 81;
#P connect 38 0 39 0;
#P connect 39 0 37 0;
#P connect 37 0 82 0;
#P hidden connect 81 0 5 0;
#P connect 5 0 4 0;
#P connect 4 0 37 1;
#P hidden connect 2 0 69 0;
#P lcolor 15;
#P connect 69 0 4 1;
#P fasten 37 1 44 0 59 254 135 301;
#P fasten 82 1 60 0 44 181 180 181;
#P connect 60 0 61 0;
#P fasten 60 0 77 0 180 205 192 205;
#P hidden connect 78 0 60 2;
#P hidden connect 2 0 67 0;
#P lcolor 15;
#P fasten 76 0 67 0 223 155 211 155;
#P fasten 75 0 67 0 203 155 211 155;
#P fasten 74 0 67 0 183 155 211 155;
#P fasten 73 0 67 0 163 155 211 155;
#P fasten 66 0 67 0 98 155 211 155;
#P fasten 63 0 67 0 114 155 211 155;
#P fasten 64 0 67 0 130 155 211 155;
#P fasten 65 0 67 0 146 155 211 155;
#P fasten 19 2 42 0 261 472 219 472;
#P connect 43 2 41 0;
#P connect 41 0 40 0;
#P connect 40 0 19 0;
#P fasten 42 0 43 0 219 498 140 498 140 339 224 339;
#P fasten 67 0 60 4 211 178 236 178;
#P connect 21 0 19 2;
#P fasten 18 0 40 1 315 410 255 410;
#P fasten 43 0 21 0 250 387 266 387;
#P fasten 19 0 17 0 223 470 282 470;
#P fasten 44 0 20 0 135 556 249 556 249 519 282 519;
#P connect 17 0 20 0;
#P connect 20 0 36 0;
#P fasten 7 0 18 0 332 379 315 379;
#P fasten 61 0 59 0 180 252 313 252 313 184 332 184;
#P connect 59 0 62 0;
#P connect 62 0 56 0;
#P fasten 82 0 55 0 27 256 332 256;
#P connect 56 0 55 0;
#P connect 55 0 53 0;
#P fasten 54 0 53 0 378 280 332 280;
#P connect 53 0 57 0;
#P connect 57 0 6 0;
#P connect 6 0 7 0;
#P connect 18 1 17 1;
#P connect 52 0 51 0;
#P hidden connect 2 0 58 0;
#P lcolor 15;
#P fasten 68 0 58 0 420 179 349 179;
#P connect 51 0 58 0;
#P connect 58 0 62 1;
#P fasten 56 1 54 0 349 253 378 253;
#P connect 57 1 8 0;
#P connect 8 0 9 0;
#P connect 9 0 17 2;
#P connect 57 2 10 0;
#P connect 10 0 11 0;
#P connect 11 0 17 3;
#P connect 57 3 12 0;
#P connect 12 0 13 0;
#P connect 13 0 17 4;
#P connect 57 4 14 0;
#P connect 14 0 15 0;
#P connect 15 0 17 5;
#P hidden connect 81 0 2 0;
#P hidden connect 2 1 78 0;
#P connect 57 5 3 0;
#P connect 3 0 16 0;
#P connect 16 0 17 6;
#P fasten 7 0 30 0 332 383 619 383;
#P fasten 36 0 30 0 282 575 619 575;
#P connect 30 0 24 0;
#P fasten 29 0 23 0 799 642 619 642;
#P fasten 28 0 23 0 763 642 619 642;
#P fasten 27 0 23 0 727 642 619 642;
#P fasten 26 0 23 0 691 642 619 642;
#P fasten 25 0 23 0 655 642 619 642;
#P connect 24 0 23 0;
#P connect 23 0 22 0;
#P fasten 9 0 31 0 382 385 655 385;
#P fasten 36 1 31 0 298 577 655 577;
#P connect 31 0 25 0;
#P fasten 23 1 22 1 703 671 662 671;
#P fasten 11 0 32 0 432 387 691 387;
#P fasten 36 2 32 0 314 579 691 579;
#P connect 32 0 26 0;
#P fasten 13 0 33 0 482 389 727 389;
#P fasten 36 3 33 0 330 581 727 581;
#P connect 33 0 27 0;
#P fasten 15 0 34 0 532 391 763 391;
#P fasten 36 4 34 0 346 583 763 583;
#P connect 34 0 28 0;
#P fasten 16 0 35 0 582 393 799 393;
#P fasten 36 5 35 0 362 585 799 585;
#P connect 35 0 29 0;
#P window clipboard copycount 84;

沒有留言:

張貼留言