Saxofony sax => JCRev r1 => dac; .25 => r1.gain; .05 => r1.mix; Sitar sit => PRCRev r2 => dac; .5 => r2.gain; .05 => r2.mix; [ 61, 63, 65, 68 ] @=> int notes[]; fun void play( float note1, float note2, float velocity ) { Std.mtof( note1 ) => sax.freq; velocity => sax.noteOn; Std.mtof( note2 ) => sit.freq; velocity * 1.5 => sit.noteOn; } fun void breathe( float duration ) { 0 => r1.gain; 0 => r2.gain; duration::ms => now; .25 => r1.gain; .5 => r2.gain; } Math.random2( 0, notes.size()-1 ) => int idx1; Math.random2( 0, notes.size()-1 ) => int idx2; while ( true ) { for( int i; i < 2; i++ ) { for ( int j; j < 4; j++ ) { play( notes[idx1], notes[idx2], 0.75 ); Math.random2( 0, notes.size()-1 ) => idx1; Math.random2( 0, notes.size()-1 ) => idx2; 400::ms => now; } breathe( 10 ); } play( notes[idx1], notes[idx2], 0.75 ); 800::ms => now; breathe( 800 ); }