That code worked for me.My first thought to solving that problem would be to use 2 different instances of LiSa, but what you did works too.
On Sunday, December 9, 2012 at 11:30 AM, Aurélien Bondis wrote:
Hi,I'm trying to figure out how to have multiple samples of different sizeslooping together.I think I kind of have it but would like to be sure :)Are the voices here for that?Record does not have a voice option, so I understand that I have toexplicitly tell my sample what part of it is supposed to be 'voice 1' or'voice 2'.Also in my code, I seem to have my voice2 starting from something like1second before its end and then loop, did I miss something ?Here is my code:---------------------------------------------------------//a simple signal pathadc => LiSa saveme => dac;//gotta tell LiSa how much memory to allocate60::second => saveme.duration;saveme.recRamp(200::ms);<<< "recording 1" >>>;1::second => now;1 => saveme.record;3::second => now;0 => saveme.record;// Set voice 1 start and stop to use in the loopsaveme.loopStart(1, 0::second);saveme.loopEnd(1, 3::second);<<< "recording 2" >>>;1::second => now;1 => saveme.record;10::second => now;0 => saveme.record;// Set voice 2 start and stop to use in the loopsaveme.loopStart(2, 3::second);saveme.loopEnd(2, 13::second);// set voice 1 to loopsaveme.loop(1,1);// set voice 2 to loopsaveme.loop(2,1);<<< "playing">>>;// play loopssaveme.play(1,1);saveme.play(2,1);while (true) {1::second => now;}------------------------------------------------------------Thanks for your help.Aurélien._______________________________________________chuck-users mailing list