[chuck-users] SndBuf: setting loop

Adam Tindale adamtindale at hotmail.com
Thu Oct 11 12:11:02 EDT 2007


Hey All,

Here is my boilerplate code for looping samples. Copy, paste, and enjoy. It should work until .loop becomes a language feature. I also like Dan's method of playing a sample into Lisa and then going. Is there a way to do this faster than realtime? I use a lot of long samples. 

--art

SndBuf mysample => dac;
"foo.wav" => mysample.read;

fun void looper(){
	while(true){
		mysample.samples()::samp => now;
		0 => mysample.pos;
	}
}

spork ~ looper();



More information about the chuck-users mailing list