Hi! We need to rework the envelope API, especially to use 'dur' in addition to or instead of floats, which should be in seconds. I leave for Beijing later today to see my family and to attend a conference - so I may be more sparse in email (unanimous cheering) for a while. However I will take a look at this soon and try to resolve bugs/ambiguities and also better document the thing. In the meantime, if anyone has illuminating Envelope examples, feel free to share. Best, Ge! On Oct 19, 2005, at 8:53 PM, Graham Percival wrote:
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_ prope 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; }
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users