[chuck-users] LiSa question

Aurélien Bondis abondis at kerunix.com
Sun Dec 9 12:30:41 EST 2012


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.


More information about the chuck-users mailing list