4 Mandolin m => JCRev r => dac;
9 [ 61, 63, 65, 66, 68, 66, 65, 63 ] @=> int notes[];
15 Std.rand2f( 0, 1 ) => m.bodySize;
16 Std.rand2f( 0, 1 ) => m.pluckPos;
17 // Std.rand2f( 0, 1 ) => m.stringDamping;
18 // Std.rand2f( 0, 1 ) => m.stringDetune;
22 <<< "body size:", m.bodySize() >>>;
23 <<< "pluck position:", m.pluckPos() >>>;
24 <<< "string damping:", m.stringDamping() >>>;
25 <<< "string detune:", m.stringDetune() >>>;
28 Std.rand2f( 1, 4 ) => float factor;
30 for( int i; i < notes.cap(); i++ )
32 play( Std.rand2(0,2)*12 + notes[i], Std.rand2f( .6, .9 ) );
33 100::ms * factor => now;
37 // basic play function (add more arguments as needed)
38 fun void play( float note, float velocity )
41 Std.mtof( note ) => m.freq;