Thanx Graham; this makes sense, and is chuckin cool! Gees, even I can
understand it! Woohoo!
-- Rich
----- Original Message -----
From: "Graham Coleman"
OK, I'm not a math wiz or even a audio/dsp wiz, and certainly not a ChucK wiz. What exactly does this mean: now - (now % T) => now;
In this context, T is a duration to which to synchronize, like a beat. minute/140 => dur beat; the expression (now % beat) is the remainder after dividing the current time into uniform beats, the amount of time that hangs over the last beat. Usually, the next step for me is: beat - (now % beat) which indicates the time left until the next beat. Chucking it to now wakes up the current shred exactly on the next beat / period. beat - (now % beat) => now; But as far as your expression now - (now % T) => now; if T is a duration, then the right hand expression would be the current shred time (a time) minus that that hangs over the duration (a duration), which would be a time in the past, which seems to throw a NegativeTimeException in the VM. Graham _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users