<br><br><div><span class="gmail_quote">On 10/10/07, <b class="gmail_sendername">Daniel Trueman</b> &lt;<a href="mailto:dtrueman@princeton.edu">dtrueman@princeton.edu</a>&gt; 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&#39;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 &quot;beat&quot; is some musically sensible amount of time and twice that is longer then our sample);
<br>------------------------<br>SndBuf buf =&gt; LiSa lisa =&gt; dac;;<br><br>&quot;my_sample.wav&quot; =&gt; buf.read;<br>2::beat =&gt; lisa.duration();<br><br>//this is the important bit<br>//notice &quot;buf&quot; will start with rate=1 and pos=0 meaning it will play automatically, once
<br>1 =&gt; lisa.record;<br>buf.samples()::samp =&gt; now;<br>0 =&gt; lisa.record;<br><br>//clean up a little (saves some cpu)<br>buf =&lt; lisa;<br></div>------------------------<br><br>And that&#39;s it, from there on you can loop, granulate and remix to your heart&#39;s content. Not that hard.
<br>Hope this is of help to someone.<br><br>Kas.<br></div>