1 //----------------------------|
2 // on-the-fly synchronization
3 // adapted from Perry's ChucK Drummin' + Ge's sine poops
5 // authors: Perry Cook (prc@cs.princeton.edu)
6 // Ge Wang (gewang@cs.princeton.edu)
7 // --------------------|
8 // add one by one into VM (in pretty much any order):
10 // terminal-1%> chuck --loop
12 // terminal-2%> chuck + otf_01.ck
14 // terminal-2%> chuck + otf_02.ck
16 //--------------------------------------|
18 // this synchronizes to period
22 // construct the patch
23 sndbuf buf => gain g => JCRev r => dac;
24 "data/snare.wav" => buf.read;
28 // where we actually want to start
34 std.rand2f(.8,.9) => buf.gain;
36 if( std.randf() > .5 )
41 (float)i / 8.0 => buf.gain;
49 (float)i / 8.0 => buf.gain;