[chuck-users] ++ return value

Kassen signal.automatique at gmail.com
Wed Jun 28 09:36:16 EDT 2006

On 6/28/06, nitro2k01 <nitro2k01 at gmail.com> wrote:
> Wild guess: No, I think now (as well as other time expressions) are
> objects and not numbers. Also, such expression would not be very
> useful, since it's ambiguous depending on sample rate. (Or is the unit
> of now independent of the sample rate?)

I agree it's ambiguous since it's not realy all that clear what we
want to add to now (I would asume one sample would seem natural) but
forwarding time by one sample is quite usefull in DSP.

This looks usefull to me;
    //simple interpolation filter
    (.5 * dac(last) ) + (.5 * my_signal(last) ) => dac;
    1::samp => now;

Admittedly the effect of this will depend on the sample rate and I
also admit that in this speciffic case cpu could be saved by using
"step" (just taking a simple exaple) but advancing now by one sample
even if it will make the code less universal is often usefull.

Ok, even in a case like that I don't see any advantage in going
"now++;" The situations where you'd use "now++" in a larger expression
would probably not be the ones where you'd advance time by one sample.

As far as I'm concerned we can forget about "now++".


More information about the chuck-users mailing list