TetaTricks/code/playsample.ck

15 lines
280 B
Plaintext

SndBuf buf => dac;
"/home/tth/Essais/Chuck/sample.wav" => buf.read;
float srate, duration;
1 => buf.gain;
for ( 0.7=>srate; srate<1.9; 1.1 *=> srate) {
4000 / srate => duration;
<<< "loop...", srate, duration >>>;
0 => buf.pos;
srate => buf.rate;
(duration)::ms => now;
}