2 // (also see examples/event/polyfony2.ck)
5 Clarinet clair => JCRev r => dac;
10 [ 61, 63, 65, 66, 68, 66, 65, 63, 61 ] @=> int notes[];
19 Std.rand2f( 0, 1 ) => clair.reed;
20 Std.rand2f( 0, 1 ) => clair.noiseGain;
21 Std.rand2f( 0, 12 ) => clair.vibratoFreq;
22 Std.rand2f( 0, 1 ) => clair.vibratoGain;
23 Std.rand2f( 0, 1 ) => clair.pressure;
27 <<< "reed stiffness:", clair.reed() >>>;
28 <<< "noise gain:", clair.noiseGain() >>>;
29 <<< "vibrato freq:", clair.vibratoFreq() >>>;
30 <<< "vibrato gain:", clair.vibratoGain() >>>;
31 <<< "breath pressure:", clair.pressure() >>>;
33 for( int i; i < notes.cap(); i++ )
35 play( 12 + notes[i], Std.rand2f( .6, .9 ) );
40 // basic play function (add more arguments as needed)
41 fun void play( float note, float velocity )
44 Std.mtof( note ) => clair.freq;
45 velocity => clair.noteOn;