13 Dec
2012
13 Dec
'12
7:28 a.m.
On Wed, Dec 12, 2012 at 09:48:15PM -0500, Jordan Orelli wrote:
will yield the number of samples in the duration. That's how it's normally printed with <<< T >>> anyway. Getting the human time like having it say 1.5s would mean you'd have to factor in the current sampling rate, not sure if that's accessible from ChucK code itself.
It is. Dividing by a second will give you the duration in seconds, regardless of the sample-rate. In fact; second / sample => float sample_rate; is valid and the easy way to detect the sample-rate from inside of ChucK, potentially useful for custom DSP stuff that needs to be tuned. Hope that helps, Kas.