[chuck-users] avoiding lag

Kassen signal.automatique at gmail.com
Mon Jun 27 17:19:35 EDT 2011


Harald;

wouldn't something like
>
>  1::second => now;
>
> be enough to ensure that all initialization is done before the next time
> step?
>
>
Not if real time passes between sending the file to the VM and its actual
execution due to compilation, I think.

In general I think (or thought) chuck always works strictly in sync,
> except if the time needed by all the operations for a time step is
> more than allowed by the next time step, which either means the
> computer is too slow or the operations should be reordered in a better
> way. Am I wrong with this assumption?
>
>
Yes, that's all true. However I don;t think ChucK can compensate for factors
like the time compilation takes and the like. Scheduling the code to start
doing interesting things at some known time after it enters the VM like with
the modulo trick mentioned or by using for example events is the safest way
to guarantee sync. Alternately you can practice sending it to the VM on the
beat, that's also fun but clearly not a option in all contexts.

Yours,
Kas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20110627/67e2b2ab/attachment.html>


More information about the chuck-users mailing list