Re: [PD] a simple counter, I'm not able to do it tonight
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 -- Frankclipped-updown- counter.pd___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/ listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] a simple counter, I'm not able to do it tonight
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___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] a simple counter, I'm not able to do it tonight
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 bbakersm...@gmail.com On Wed, Mar 18, 2009 at 8:38 PM, Ben Baker-Smith bbakersm...@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 updown-counter.pd Description: Binary data ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] a simple counter, I'm not able to do it tonight
Hoping it will help you in the building of your counter.++Jack counter.pd Description: Binary data 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 bbakersm...@gmail.comOn Wed, Mar 18, 2009 at 8:38 PM, Ben Baker-Smith bbakersm...@gmail.com wrote: 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 mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list updown-counter.pd___Pd-list@iem.at mailing listUNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] a simple counter, I'm not able to do it tonight
Jack escribió: Hoping it will help you in the building of your counter. ++ Jack The B example is perfect! thank you Jack cheers Husk ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] a simple counter, I'm not able to do it tonight
Check out the attached patch, more what you're looking for? -Ben Message: 3 Date: Sat, 21 Mar 2009 14:59:26 +0100 From: Husk 00 hus...@gmail.com Subject: Re: [PD] a simple counter, I'm not able to do it tonight To: pd list pd-list@iem.at Message-ID: f15630960903210659x6d561b7bt1e0b68c479698...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 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 simplecounter.pd Description: Binary data ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] a simple counter, I'm not able to do it tonight
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 #N canvas 207 35 450 300 10; #X obj 120 157 +; #X obj 167 158 f; #X msg 139 124 1; #X msg 90 124 -1; #X floatatom 120 213 5 0 0 0 - - -; #X msg 139 95 up; #X msg 90 96 down; #X obj 120 241 hradio 15 1 0 11 empty empty empty 0 -8 0 10 -262144 -1 -1 0; #X obj 120 189 clip 0 10; #X connect 0 0 8 0; #X connect 1 0 0 1; #X connect 2 0 0 0; #X connect 3 0 0 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 3 0; #X connect 8 0 1 0; #X connect 8 0 4 0; ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] a simple counter, I'm not able to do it tonight
hi, in pdmtl abstractions there's [count.updown]: http://wiki.dataflow.ws/PdMtlAbstractions video showing how to install it: http://www.vimeo.com/psc pat ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] a simple counter, I'm not able to do it tonight
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. ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] a simple counter, I'm not able to do it tonight
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] -- ::: derek holzer ::: http://blog.myspace.com/macumbista ::: http://www.vimeo.com/macumbista ::: ---Oblique Strategy # 74: Get your neck massaged ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] a simple counter, I'm not able to do it tonight
if it is a problem to use [wrap], this should also work: [bang( | [f 100]x[+ 1] | [mod 200] | [- 100] | [abs] ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] a simple counter, I'm not able to do it tonight
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 smime.p7s Description: S/MIME Cryptographic Signature ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] a simple counter, I'm not able to do it tonight
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 -- ::: derek holzer ::: http://blog.myspace.com/macumbista ::: http://www.vimeo.com/macumbista ::: ---Oblique Strategy # 14: Ask people to work against their better judgement ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] a simple counter, I'm not able to do it tonight
Hello Husk, Look at this. Hope it will help you. ++ Jack counterUPandDOWN.pd Description: Binary data 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 ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] a simple counter, I'm not able to do it tonight
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