4 StifKarp m => JCRev r => dac;
9 [ 61, 63, 65, 66, 68, 66, 65, 63 ] @=> int notes[];
14 Std.rand2f( 0, 1 ) => m.pickupPosition;
15 Std.rand2f( 0, 1 ) => m.sustain;
16 Std.rand2f( 0, 1 ) => m.stretch;
19 <<< "pickup:", m.pickupPosition() >>>;
20 <<< "sustain:", m.sustain() >>>;
21 <<< "stretch:", m.stretch() >>>;
24 Std.rand2f( 1, 4 ) => float factor;
26 for( int i; i < notes.cap(); i++ )
28 play( Std.rand2(0,2)*12 + notes[i], Std.rand2f( .6, .9 ) );
29 100::ms * factor => now;
33 // basic play function (add more arguments as needed)
34 fun void play( float note, float velocity )
37 Std.mtof( note ) => m.freq;