<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">look for this in the next release:<DIV><BR class="khtml-block-placeholder"></DIV><DIV>&gt;&gt;&gt;&gt;&gt;</DIV><DIV>//ugens</DIV><DIV>SndBuf buf;</DIV><DIV>LiSa lisa =&gt; dac;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>//change this path to your own sample</DIV><DIV>"/Users/dan/Files/Chuck/LiSa_examples/TomVega.wav" =&gt; buf.read;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>//set lisa buffer size to sample size</DIV><DIV>buf.samples() * 1::samp =&gt; lisa.duration;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>//transfer values from SndBuf to LiSa</DIV><DIV>for ( 0 =&gt; int i; i &lt; buf.samples(); i++ ) {</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>//args are sample value and sample position (dur)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>lisa.valueAt(buf.valueAt(i), i * 1::samp);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>//party on...</DIV><DIV>1  =&gt; lisa.play;</DIV><DIV>2. =&gt; lisa.rate;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>//hang on until it's done...</DIV><DIV>lisa.duration() * 0.5 =&gt; now;</DIV><DIV>&lt;&lt;&lt;&lt;&lt;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>dt</DIV><DIV><BR><DIV><DIV>On Oct 11, 2007, at 12:27 PM, Kassen wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><BR><BR><DIV><SPAN class="gmail_quote">On 10/11/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;"> <DIV style="">i believe that SndBuf has a valueAt() method, which you can get values with, so all LiSa would need is a similar valueAt() call to set values with and we could automatically load sounds into LiSa without passing time. i'll take a look at this soon; should be easy (whereas loading soundfiles directly into LiSa won't be so easy). </DIV></BLOCKQUOTE><DIV><BR><BR>That would be nice! Especially with a get method for the same. That would be equivalent to my idea of overloading SndBuf.read() to accept arrays of floats to be assigned to it instead of pre-recorded samples. <BR></DIV><BR><BR>Great idea.<BR>Kas.<BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">chuck-users mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</A></DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>