On Fri, 27 Jul 2007, Frank Barknecht wrote:
It's possible even simpler: Instead of a classical counter you can use
an accumulator, which is a similar idiom, but has [f ] and [+ ]
reversed: [+ ]x[f ]. Then you send the step size instead of a bang into
the [+].
Accumulator is the name I usually use for this, but in my other mail I
call it "pre-incrementing" instead. This is a reference to C/C++ and
old-style machine languages.
The name "C++" itself refers to post-incrementation, to signify that it is
an "incremented" C, variable-wise. (value-wise, C+1 already does it)
The other incrementors of C/C++ (variable-wise) are pre-increments, in
that the modification of the variable happens before the result is
produced, and that result is produced from the new state of the variable.
if I write ++C or C+=1 it's a post-increment.
In Pd, post-increment is done by using the output of a [f] variable,
whereas pre-increment is done by using the output of the [+ 1] that goes
back into the variable.
Actually it's possible also to output like a pre-increment but only put it
in the variable when you are finished using it, by changing the wire
order, but usually, this distinction does not matter.
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list