If I could make a suggestion and have a footnote added to the
documentation mentioning this action about setting next, and that it
will actually have the value offset by 1 sample. While this makes
perfect sense, it might seem a little odd when unfamiliar with this.
Mike
On 2/6/06, Ge Wang
Hi Mike!
impulse i => blackhole;
fun void doit() { while(true) { 1.0 => i.next; 100::ms => now; } }
now + 1::second => time later;
spork ~ doit();
while(now < later) { i.last() => float val; if (val != 0.0) { <<< now, i.last() >>>; } 1::samp => now; }
Interesting. There should be exactly 1 sample of offset, not 2, since chucking to i.next sets the next sample, which isn't detected by .last() until after time=1.0, when the sample is actually generated.
I looked into this and tracked down the "bug" that added one extra samp's offset to .last. This has been fixed and committed to CVS, and will be in 1.2.0.5. There should be only 1 samp of offset now. Thanks for reporting this!
Best, Ge! _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- Help the Environment, Plant a Bush back in Texas!