<br><div class="gmail_quote">On Fri, Jul 24, 2009 at 8:42 PM, Hans Aberg <span dir="ltr">&lt;<a href="mailto:haberg@math.su.se">haberg@math.su.se</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br></div>
The idea is to treat time between samples as only computed, emulated, and not real. The program computes ahead, and collects the values for the next sample which is presented.<div class="im"></div></blockquote><div><br></div>
<div>Hi!</div><div><br></div><div>Consider this:</div><div><br></div><div>SinOsc osc =&gt; dac;</div><div><br></div><div>while (true) {</div><div>  for (0 =&gt; int i; i &lt; 10; i++) {</div><div>    i*1000 =&gt; osc.freq;</div>
<div>    1::samp =&gt; now;</div><div>  }</div><div>}</div><div><br></div><div>Stuff like this can become pretty difficult to try to compute ahead, since general ChucK code plays on the same timing playfield as the UGens. Also, consider if the for loop uses the current output value from osc in its calculation, causing a compute ahead-loop. Also, I think you can put the for loop in a different file than the oscillator it manipulates (with some added class magic).</div>
<div><br></div><div>/Stefan</div></div>