sndbuf clapper1 => dac.left; sndbuf clapper2 => dac.right; "data/clap.wav" => clapper1.read; "data/clap.wav" => clapper2.read; // the full "clapping music" figure [.5, .5, 1, 0, .5, 1, 0, 1, 0, .5, 1, 0 ] @=> float seq[]; 0 => int c1counter; 0 => int c2counter; 0 => int shiftCounter; 3 => int whenToShift; while (true) { seq[c1counter] => clapper1.gain; seq[c2counter] => clapper2.gain; 0 => clapper1.pos; 0 => clapper2.pos; c1counter++; c2counter++; if (c1counter >= seq.cap()) { 0 => c1counter; } if (shiftCounter < whenToShift) { if (c2counter >= seq.cap()) { 0 => c2counter; shiftCounter ++; } } else { if (c2counter >= seq.cap()-1) { 0 => c2counter; shiftCounter ++; 0 => shiftCounter; } } .18::second => now; }