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.

--
Jeff Albert
Assistant Professor (Extraordinary) of Music Industry Studies
Loyola University New Orleans
Office: Communications/Music Complex 428P
Office Phone: (504) 865-2606
Google Voice: (504) 315-5167
jvalbert@loyno.edu
http://www.loyno.edu/~jvalbert

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 sizes
looping 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 to
explicitly 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 like
1second before its end and then loop, did I miss something ?

Here is my code:
---------------------------------------------------------
//a simple signal path
adc => LiSa saveme => dac;

//gotta tell LiSa how much memory to allocate
60::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 loop
saveme.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 loop
saveme.loopStart(2, 3::second);
saveme.loopEnd(2, 13::second);
// set voice 1 to loop
saveme.loop(1,1);
// set voice 2 to loop
saveme.loop(2,1);
<<< "playing">>>;
// play loops
saveme.play(1,1);
saveme.play(2,1);
while (true) {
1::second => now;
}
------------------------------------------------------------

Thanks for your help.
Aurélien.
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users