Hi list, I need a little help. I'm using an up-down counter. It has a min and a max limit: 0 and 100 (for say something). I don't like my solution and i know there is a easier way to do it; but tonight I can't find it :( So, someone can help me with a rapid solution? thanks in advance Husk
make a normal counter:
[f ]x[+ 1]
with the outlet of [f ] going to the LEFT inlet of [+ 1] , and the outlet of [+ 1] going to the RIGHT inlet of [f ]
then,
[wrap -99 100] | [abs]
if your limit was 1000, you would do [wrap -999 1000] ..etc
hope that works.
ah, but which [wrap]? there are several which do different things....
d.
hard off wrote:
make a normal counter:
[f ]x[+ 1]
with the outlet of [f ] going to the LEFT inlet of [+ 1] , and the outlet of [+ 1] going to the RIGHT inlet of [f ]
then,
[wrap -99 100] | [abs]
really?
i mean the [wrap] that wraps numbers between two values.
what do the other ones do? i know of the signal version of course.
if it is a problem to use [wrap], this should also work:
[bang( | [f 100]x[+ 1] | [mod 200] | [- 100] | [abs]
hard off wrote:
really?
i mean the [wrap] that wraps numbers between two values.
there are different versions of [wrap] around. the one from zexy wraps between to arbitrary boundaries.
the one that comes with Pd (>0.42), behaves like [wrap~] as it only wraps between 0 and 1 (which is the default for zexy's wrap as well).
there are more wrap implementations around in various other libraries.
fgamsdr IOhannes
Yes, that's what I was trying to point out. I've been bitten by different versions of [wrap] before. I guess that has been cleaned up with the 0.42 release...
D.
IOhannes m zmoelnig wrote:
hard off wrote:
really?
i mean the [wrap] that wraps numbers between two values.
there are different versions of [wrap] around. the one from zexy wraps between to arbitrary boundaries.
the one that comes with Pd (>0.42), behaves like [wrap~] as it only wraps between 0 and 1 (which is the default for zexy's wrap as well).
there are more wrap implementations around in various other libraries.
fgamsdr IOhannes
Hello Husk,
Look at this. Hope it will help you. ++
Jack
Le 18 mars 09 à 05:16, Husk 00 a écrit :
Hi list, I need a little help. I'm using an up-down counter. It has a min and a max limit: 0 and
100 (for say something). I don't like my solution and i know there is a easier way to do it;
but tonight I can't find it :( So, someone can help me with a rapid solution? thanks in advance Husk _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list