[chuck-users] making a duration into a string?

Kassen signal.automatique at gmail.com
Mon Jan 11 11:04:12 EST 2010


Andrew;

Understand that times are represented as a delta of the number of
> samples since the VM (or maybe it's the shred) started executing.
> Again, the time itself doesn't carry any information about how it was
> created, []


Sorry for the late response; I haven't been at home over the weekend and my
hosts were dealing with a LAN issue. Just catching up on mails here.

You are quite right here, and I'd like to add that time is always expressed
as samples since the origin of the VM. Instantiating a new variable of type
time will have it refer to "time 0" being the origin of the VM. This is the
same for all Shreds, no matter when they were sporked or added. "now" is a
special case (of type time) and always refers to the amount of time that has
passed since the start of the VM.

It's also interesting to note that while time and now are quite universal
things they are expressed in samps yet obviously the duration of a samp
depends on the settings used. It's probably not a good idea to perform any
calculations (but dsp) expressed in samps as your code won't be portable
from machine to machine. BPM and/or tuning may change if you do.

Hope that clarifies. Likely this was already well known to many but it's
such a important point that I didn't want to gloss over it.

Yours,
Kas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20100111/90f88394/attachment-0001.html>


More information about the chuck-users mailing list