TetaTricks/code/playsample.ck

15 lines
280 B
Plaintext
Raw Normal View History

2021-10-30 15:54:36 +02:00
SndBuf buf => dac;
2021-11-03 09:08:40 +01:00
"/home/tth/Essais/Chuck/sample.wav" => buf.read;
2021-10-30 15:54:36 +02:00
float srate, duration;
1 => buf.gain;
2021-11-03 09:08:40 +01:00
for ( 0.7=>srate; srate<1.9; 1.1 *=> srate) {
4000 / srate => duration;
2021-10-30 15:54:36 +02:00
<<< "loop...", srate, duration >>>;
0 => buf.pos;
srate => buf.rate;
(duration)::ms => now;
}