4 Saxofony sax => JCRev r => dac;
9 [ 61, 63, 65, 66, 68 ] @=> int notes[];
15 Std.rand2f( 0, 1 ) => sax.stiffness;
16 Std.rand2f( 0, 1 ) => sax.aperture;
17 Std.rand2f( 0, 1 ) => sax.noiseGain;
18 Std.rand2f( 0, 1 ) => sax.blowPosition;
19 Std.rand2f( 0, 12 ) => sax.vibratoFreq;
20 Std.rand2f( 0, 1 ) => sax.vibratoGain;
21 Std.rand2f( 0, 1 ) => sax.pressure;
25 <<< "stiffness:", sax.stiffness() >>>;
26 <<< "aperture:", sax.aperture() >>>;
27 <<< "noiseGain:", sax.noiseGain() >>>;
28 <<< "blowPosition:", sax.blowPosition() >>>;
29 <<< "vibratoFreq:", sax.vibratoFreq() >>>;
30 <<< "vibratoGain:", sax.vibratoGain() >>>;
31 <<< "pressure:", sax.pressure() >>>;
34 Std.rand2f( .75, 2 ) => float factor;
36 for( int i; i < notes.cap(); i++ )
38 play( 12 + notes[i], Std.rand2f( .6, .9 ) );
39 300::ms * factor => now;
43 // basic play function (add more arguments as needed)
44 fun void play( float note, float velocity )
47 Std.mtof( note ) => sax.freq;
48 velocity => sax.noteOn;