So you want a counter that counts to 100 and then begins at 0 (or 1) again?
If I'm understanding correctly I would do the following:
[bang( | [float]X[+ 1] | [select 100] | [0(
the 0 message at the end could also be a 1 depending on if you want the counter to begin on 0 or 1, it is sent to the right inlet of float.
the outlet of float is, in addition to [select], also sent wherever you want the counter to be output to.
here is the same patch as a subpatch (keeping in mind that the 0 message still must be connected to the right inlet of float):
[inlet]
|
[b]
|
[float]X[+ 1]
|
| [outlet]
|
[select 100]
|
[0(
...of course you can always use the [counter] object. [counter 100] will probably do the trick all by itself. and finally, if i'm understanding incorrectly and you wanted it to count up and back down, use the example that was posted previously with the absolute values and [wrap], or use [counter 100] with the up/down message sent to it, you'll have to check the help file for exactly what that message is...
hope something in there helps.
-Ben pd-list@iem.at
Thank you all, but I expressed bad my necessity. I found a solution but still don't like it. I find inelgant and too much complex for what it has to do. I need a counter with two bang, first one for add one unit to the counter, second one for subtract one unit. Couter must have min and max limits, like 0 and 10 (for example). I attach my patch just like example, but as I said it's not a good solution. How should you do this? cheers Husk
Ben Baker-Smith bbakersmith@gmail.com On Wed, Mar 18, 2009 at 8:38 PM, Ben Baker-Smith bbakersmith@gmail.comwrote:
So you want a counter that counts to 100 and then begins at 0 (or 1) again?
If I'm understanding correctly I would do the following:
[bang( | [float]X[+ 1] | [select 100] | [0(
the 0 message at the end could also be a 1 depending on if you want the counter to begin on 0 or 1, it is sent to the right inlet of float.
the outlet of float is, in addition to [select], also sent wherever you want the counter to be output to.
here is the same patch as a subpatch (keeping in mind that the 0 message still must be connected to the right inlet of float):
[inlet] | [b] | [float]X[+ 1] |
| [outlet] | [select 100] | [0(...of course you can always use the [counter] object. [counter 100] will probably do the trick all by itself. and finally, if i'm understanding incorrectly and you wanted it to count up and back down, use the example that was posted previously with the absolute values and [wrap], or use [counter 100] with the up/down message sent to it, you'll have to check the help file for exactly what that message is...
hope something in there helps.
-Ben pd-list@iem.at _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hoping it will help you in the building of your counter. ++
Jack 
Le 21 mars 09 à 14:59, Husk 00 a écrit :
Thank you all, but I expressed bad my necessity. I found a solution
but still don't like it. I find inelgant and too much complex for
what it has to do. I need a counter with two bang, first one for
add one unit to the counter, second one for subtract one unit.
Couter must have min and max limits, like 0 and 10 (for example). I
attach my patch just like example, but as I said it's not a good
solution. How should you do this? cheers HuskBen Baker-Smith bbakersmith@gmail.com On Wed, Mar 18, 2009 at 8:38 PM, Ben Baker-Smith
bbakersmith@gmail.com wrote: So you want a counter that counts to 100 and then begins at 0 (or
- again?
If I'm understanding correctly I would do the following:
[bang( | [float]X[+ 1] | [select 100] | [0(
the 0 message at the end could also be a 1 depending on if you want
the counter to begin on 0 or 1, it is sent to the right inlet of
float.the outlet of float is, in addition to [select], also sent wherever
you want the counter to be output to.here is the same patch as a subpatch (keeping in mind that the 0
message still must be connected to the right inlet of float):[inlet] | [b] | [float]X[+ 1] |
| [outlet] | [select 100] | [0(...of course you can always use the [counter] object. [counter
100] will probably do the trick all by itself. and finally, if i'm understanding incorrectly and you wanted it to
count up and back down, use the example that was posted previously
with the absolute values and [wrap], or use [counter 100] with the up/down message sent to it, you'll
have to check the help file for exactly what that message is...hope something in there helps.
-Ben
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
<updown-counter.pd> _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
hi,
in pdmtl abstractions there's [count.up&down]: http://wiki.dataflow.ws/PdMtlAbstractions
video showing how to install it: http://www.vimeo.com/psc
pat
Hallo, Husk 00 hat gesagt: // Husk 00 wrote:
Thank you all, but I expressed bad my necessity. I found a solution but still don't like it. I find inelgant and too much complex for what it has to do. I need a counter with two bang, first one for add one unit to the counter, second one for subtract one unit. Couter must have min and max limits, like 0 and 10 (for example). I attach my patch just like example, but as I said it's not a good solution. How should you do this?
Like in the attachement for example. It uses an accumulator idiom, which is a reversed traditional counter where you exhange the [f ]x[+ 1] so it becomes this instead: [+ ]x[f ]. Then drive it with -1 and 1.
It's well explained in Andy Farnells fantastic Pd tutorial: http://aspress.co.uk/ds/pdf/DesigningSound_abridged_Pure_Data_introduction.p... Page 35.
Frank
Very nice ! ++
Jack
Le 21 mars 09 à 17:58, Frank Barknecht a écrit :
Hallo, Husk 00 hat gesagt: // Husk 00 wrote:
Thank you all, but I expressed bad my necessity. I found a
solution but still don't like it. I find inelgant and too much complex for what
it has to do. I need a counter with two bang, first one for add one unit to the counter, second one for subtract one unit. Couter must have min
and max limits, like 0 and 10 (for example). I attach my patch just like
example, but as I said it's not a good solution. How should you do this?Like in the attachement for example. It uses an accumulator idiom,
which is a reversed traditional counter where you exhange the [f ]x[+ 1] so it
becomes this instead: [+ ]x[f ]. Then drive it with -1 and 1.It's well explained in Andy Farnells fantastic Pd tutorial: http://aspress.co.uk/ds/pdf/ DesigningSound_abridged_Pure_Data_introduction.pdf Page 35.
Ciao
Frank<clipped-updown- counter.pd>_______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
On Sat, 21 Mar 2009, Frank Barknecht wrote:
Like in the attachement for example. It uses an accumulator idiom, which is a reversed traditional counter where you exhange the [f ]x[+ 1] so it becomes this instead: [+ ]x[f ]. Then drive it with -1 and 1.
Actually, the latter [f] could be replaced by a [t f], as it's just a gimmick to get pd to allow the [+] to be connected to itself.
a [f] in which the right-inlet is unused, is pretty much a [t f].
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec