[chuck-users] SndBuf: setting loop

Kassen signal.automatique at gmail.com
Thu Oct 11 11:19:04 EDT 2007


On 10/10/07, Daniel Trueman <dtrueman at princeton.edu> wrote:
>
>
> for now, though, you can read a file in with SndBuf and then stuff it
> into a LiSa buffer for looping fun. i don't have time at the moment
> to hack up an example of doing this, but it should be just a matter
> of piping the output of SndBuf into LiSa for the appropriate amount
> of time; basically sampling the sample. a kludge, but should work for
> now!



What I tend to do is this (asuming "beat" is some musically sensible amount
of time and twice that is longer then our sample);
------------------------
SndBuf buf => LiSa lisa => dac;;

"my_sample.wav" => buf.read;
2::beat => lisa.duration();

//this is the important bit
//notice "buf" will start with rate=1 and pos=0 meaning it will play
automatically, once
1 => lisa.record;
buf.samples()::samp => now;
0 => lisa.record;

//clean up a little (saves some cpu)
buf =< lisa;
------------------------

And that's it, from there on you can loop, granulate and remix to your
heart's content. Not that hard.
Hope this is of help to someone.

Kas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20071011/4d2def2a/attachment-0001.htm 


More information about the chuck-users mailing list