[chuck-users] Envelope.time (repost)

Graham Percival gpermus at gmail.com
Wed Oct 19 20:53:56 EDT 2005


The docs don't say what Envelope.time (from STK) is measured in --
they just says that it's a float.  From the code below, I determined
that when .target is 0.5, it measures 500::ms (in other words,
"2.0 => e.time" takes 1 second to reach the target); when the
target is 0.25, it measures 250::ms.  Is this proper behavior?  I
was expecting the time to be... well, more absolute.  :)    ie
1.0 would mean 1.0 seconds or 1.0 ms.  If this _is_ prope
  behavior, could it be documented?

BTW, the example file "sixty.ck" is missing from the 1.2 and
source tarballs.

- Graham Percival

---- envtest.ck
100 => int TIME;
sinosc s => Envelope e => dac;
220 => s.freq;
0.5 => e.target;
1.0 => e.time;

0 => int i;
while (true)
    <<< i*TIME, e.value() >>>;
    if (e.value() == e.target()) break;

More information about the chuck-users mailing list