<br><br><div><span class="gmail_quote">On 10/10/07, <b class="gmail_sendername">Daniel Trueman</b> <<a href="mailto:dtrueman@princeton.edu">dtrueman@princeton.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>for now, though, you can read a file in with SndBuf and then stuff it<br>into a LiSa buffer for looping fun. i don't have time at the moment<br>to hack up an example of doing this, but it should be just a matter<br>
of piping the output of SndBuf into LiSa for the appropriate amount<br>of time; basically sampling the sample. a kludge, but should work for<br>now!</blockquote><div><br><br>What I tend to do is this (asuming "beat" is some musically sensible amount of time and twice that is longer then our sample);
<br>------------------------<br>SndBuf buf => LiSa lisa => dac;;<br><br>"my_sample.wav" => buf.read;<br>2::beat => lisa.duration();<br><br>//this is the important bit<br>//notice "buf" will start with rate=1 and pos=0 meaning it will play automatically, once
<br>1 => lisa.record;<br>buf.samples()::samp => now;<br>0 => lisa.record;<br><br>//clean up a little (saves some cpu)<br>buf =< lisa;<br></div>------------------------<br><br>And that's it, from there on you can loop, granulate and remix to your heart's content. Not that hard.
<br>Hope this is of help to someone.<br><br>Kas.<br></div>