examples/basic/doh.ck
raw| 1 | // DOH!!! |
| 2 | |
| 3 | // the patch |
| 4 | SndBuf buf => dac; |
| 5 | // load the file ("special:" files are built into chuck) |
| 6 | "special:dope" => buf.read; |
| 7 | |
| 8 | // time loop |
| 9 | while( true ) |
| 10 | { |
| 11 | // set playback position to beginning |
| 12 | 0 => buf.pos; |
| 13 | // randomize playback rate |
| 14 | Math.random2f(.75,1.25) => buf.rate; |
| 15 | // randomize time |
| 16 | 500::ms => now; |
| 17 | } |