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

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


Greetings,

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_ proper behavior, could it be documented?

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

Cheers,
- 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() >>>;
   i++;
   if (e.value() == e.target()) break;
   TIME::ms=>now;
}

-------------- 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