[chuck-users] LiSa SndBuf rate bug?

mike clemow gelfmuse at gmail.com
Fri Nov 14 20:10:21 EST 2008


Hey folks,

In the below example (which you will all find in the LiSa-SndBuf.ck
file in examples in your installation), after populating the buffer in
the LiSa object with the values of the samples from SndBuf, the rate
of the LiSa object is set equal to 2. in order to play back normally.
Why is it not 1?  Why this should be the case makes little sense to me
and I respectfully submit this as a bug, unless someone can provide a
reasonable explanation.

Thoughts?

-Mike


-----

//ugens
SndBuf buf;
LiSa lisa => dac;

//change this path to your own sample
"/Users/dan/Files/Chuck/LiSa_examples/TomVega.wav" => buf.read;

//set lisa buffer size to sample size
buf.samples() * 1::samp => lisa.duration;

//transfer values from SndBuf to LiSa
for ( 0 => int i; i < buf.samples(); i++ ) {

	//args are sample value and sample index (dur must be integral in samples)
	lisa.valueAt(buf.valueAt(i), i::samp);
	
}

//party on...
1  => lisa.play;
2. => lisa.rate;

//look at some of the data
//returns value at given time, with linear interpolation
<<< Std.rand2f( 0., lisa.duration() / 1::samp ) :: samp  => lisa.valueAt >>>;

//hang on until it's done...
lisa.duration() * 0.5 => now;

-- 
http://michaelclemow.com
http://semiotech.org


More information about the chuck-users mailing list