[chuck-users] What does "float Envelope.time" measure?

Graham Percival gpermus at gmail.com
Tue Oct 4 03:37:59 EDT 2005


The docs don't say what Envelope.time (from STK) is measured in -- they 
says that it's a float.  From the code below, I determined that when 
is 0.5, it measures 500::ms (in other words, "2.0 => e.time" takes 1 
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_ proper 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;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 891 bytes
Desc: not available
Url : http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20051004/b0efd67e/attachment.bin

More information about the chuck-users mailing list