/usr/share/doc/chuck/examples/basic/valueat.ck is in chuck 1.2.0.8.dfsg-1.4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | // (see sndbuf.ck or otf_01.ck for non-insane usage of sndbuf)
SndBuf buf;
"../data/kick.wav" => buf.read;
// the patch (no sndbuf involved)
Impulse i => dac;
// infinite time-loop
while( true )
{
// index
int pos;
// repeat this many times
repeat( buf.samples() )
{
// set next sample
buf.valueAt( pos ) => i.next;
// increment index
pos++;
// advance time by one samp
1::samp => now;
}
}
|