Mandolin m => dac; 400 => m.freq; ModalBar b => dac; 900 => b.freq; while (true) { // do forever Std.rand2f(0, 1)=> float f; //f is now a random number between 0 and 1 if (f < .8) { //adjust threshold for different probabilities of playing m, b //currently, we have an 80% chance of playing mandolin m.noteOn(1.0); } else { b.noteOn(1.0); } .1::second => now; }