[chuck-users] GC vs real-time (was Getting Started with ChucK)

Stefan Blixt stefan.blixt at gmail.com
Fri Jul 24 15:15:57 EDT 2009


On Fri, Jul 24, 2009 at 8:42 PM, Hans Aberg <haberg at math.su.se> wrote:

>
> 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.
>

Hi!

Consider this:

SinOsc osc => dac;

while (true) {
  for (0 => int i; i < 10; i++) {
    i*1000 => osc.freq;
    1::samp => now;
  }
}

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).

/Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20090724/b6136162/attachment.html>


More information about the chuck-users mailing list