On Fri, 27 Jul 2007, Andy Farnell wrote:

This implementatiion has a small bug. When you change direction the last value stored in the float is flushed through so it overshoots by 1 in either direction. But it's simple to understand.

That's because you're supposed to use the output of [+] instead of the output of [f]. That's the difference between a post-incrementing counter (usual) and a pre-incrementing counter (what is wanted here)

If you do a pre-incrementing counter with multiple directions or speeds, it's better to make the system driven by the [+]. Then it can use its own right inlet as the counter value. However Pd forces wires to connect only different objects, so you have to use something like [t f] as intermediate for connecting [+] to itself.

 _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
_______________________________________________
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to