1 // STK BlowBotl; using classic STK controlChange
2 // (also see blowbotl.ck)
5 BlowBotl bottle => dac;
8 [0, 2, 4, 7, 8, 11] @=> int scale[];
13 Std.rand2f( 0, 128 ) => float noisegain;
14 Std.rand2f( 0, 128 ) => float vibratofreq;
15 Std.rand2f( 0, 128 ) => float vibratogain;
16 Std.rand2f( 0, 128 ) => float volume;
19 <<< "noise gain:", noisegain, "/ 128.0" >>>;
20 <<< "vibrato freq:", vibratofreq, "/ 128.0" >>>;
21 <<< "vibrato gain:", vibratogain, "/ 128.0" >>>;
22 <<< "volume:", volume, "/ 128.0" >>>;
25 bottle.controlChange( 4, noisegain );
27 bottle.controlChange( 11, vibratofreq );
29 bottle.controlChange( 1, vibratogain );
31 bottle.controlChange( 128, volume );
34 scale[Std.rand2(0,scale.cap()-1)] + 57 => Std.mtof => bottle.freq;