[PD] Pd dual metro ..
Frank Barknecht
fbar at footils.org
Wed Aug 2 14:34:46 CEST 2006
Hallo,
Tas Pas hat gesagt: // Tas Pas wrote:
> > [r $0-restart]
> > |
> > [f 0]/[+ 1]/[mod 8]
> > | |
> > | [s $0-restart]
> > |
> > counter output here
>
> I tried the modulo method but I saw that if the user change the max value to a value less than
> the current value, the counter never resets again ...
Hm, it should reset. If you have a [mod 10] and you send a current
value bigger than 10 into it, say 12, then out you get a 2 which is
fine and what is wanted generally.
> I tried the implementation with the [select] object and I put and extra select to be sure that
> the counter never exceeds the maximum of 8 steps.
I'm away from Pd at the moment so I cannot test your patch, but I find
counters stopped or reset by only one value to be a bit "dangerous",
because you always have to make sure that this value is actually
reached. There are a couple of things that could go wrong. For example
if you count only even values like 0 2 4 ..., [select 11] will never
select anything. ANother common danger is trying to compare floating
point values lke [select 1.001] or [== 0.01], which also will not work
generally.
That's why I generally recommend the [mod] counter for counting.
Ciao
--
Frank Barknecht _ ______footils.org_ __goto10.org__
More information about the Pd-list
mailing list