TetaTricks/code/playsample.ck

15 lines
256 B
Plaintext
Raw Normal View History

2021-10-30 15:54:36 +02:00
SndBuf buf => dac;
"sample.wav" => buf.read;
float srate, duration;
1 => buf.gain;
for ( 0.7=>srate; srate<1.8; 0.1 +=> srate) {
900 / srate => duration;
<<< "loop...", srate, duration >>>;
0 => buf.pos;
srate => buf.rate;
(duration)::ms => now;
}