HI I have an abstraction generating numbers permanently , i have the output connected to a "Number", i would like to only let pass one value each 10 times it changes. I was wondering if there is a easy way of doing this in pd? Or should i build a mechanism with spigots and metronome?
thanks
Ronny
On Mon, 31 Oct 2011 07:10:32 -0700 ronni montoya ronni.montoya@gmail.com wrote:
HI I have an abstraction generating numbers permanently , i have the output connected to a "Number", i would like to only let pass one value each 10 times it changes.
Is it incrementing 0,1,2,3,4,5,6,7,8,9.... ?
If so try
[div 10] | [change]
Or is it an unordered sequence of numbers?
Then you need a counter modulo 10 to bang the value currently held in a float box.
| [t b f] | | [f]X[+ 1] | | | [mod 10] | | | [sel 0] | | | [ f ] |
Le 2011-10-31 à 15:42:00, Marian Weger a écrit :
i think, it would be safer to put the modulo inside the counter.
Indeed : when the counter overflows at 16777216, it sticks there and doesn't move anymore.
It's not technically an «overflow», but it's certainly the place where +1 stops working at all, so, contextually, it's still where failure starts.
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC
[change] | [t b] | [f ]x[+ 1] | [mod 10] | [sel 0]
On Mon, Oct 31, 2011 at 11:10 PM, ronni montoya ronni.montoya@gmail.comwrote:
HI I have an abstraction generating numbers permanently , i have the output connected to a "Number", i would like to only let pass one value each 10 times it changes. I was wondering if there is a easy way of doing this in pd? Or should i build a mechanism with spigots and metronome?
thanks
Ronny
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Le 2011-10-31 à 07:10:00, ronni montoya a écrit :
HI I have an abstraction generating numbers permanently , i have the output connected to a "Number", i would like to only let pass one value each 10 times it changes. I was wondering if there is a easy way of doing this in pd? Or should i build a mechanism with spigots and metronome?
GridFlow has [shunt 10, mode 1] which outputs each incoming message to a different outlet, in a set of 10 outlets. You can use that to get only one message out of 10. For your specific case, you still need a [change]. This makes a solution in 2 objects (instead of 7 with plain pd).
See help file : http://gridflow.ca/help/shunt-help.html
As a shortcut, all options in the inlet 0 section can be put inside the objectbox using the comma (as in my example).
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC
one question here is:
do the numbers change ever time? you say "one value each 10 times it changes", but does this mean that sometimes you get non-changing values? or will it change on ever value?
ie, will your sequences be like, "1, 3, 6, 7, 8, 4, 12, 1, 2, 9, ...."
or will they be like, "1, 4, 2, 2, 2, 7, 8, 4, 4, 4, 4, ... "
??
On Mon, Oct 31, 2011 at 11:52 PM, Mathieu Bouchard matju@artengine.cawrote:
Le 2011-10-31 à 07:10:00, ronni montoya a écrit :
HI I have an abstraction generating numbers permanently , i have the
output connected to a "Number", i would like to only let pass one value each 10 times it changes. I was wondering if there is a easy way of doing this in pd? Or should i build a mechanism with spigots and metronome?
GridFlow has [shunt 10, mode 1] which outputs each incoming message to a different outlet, in a set of 10 outlets. You can use that to get only one message out of 10. For your specific case, you still need a [change]. This makes a solution in 2 objects (instead of 7 with plain pd).
See help file : http://gridflow.ca/help/shunt-**help.htmlhttp://gridflow.ca/help/shunt-help.html
As a shortcut, all options in the inlet 0 section can be put inside the objectbox using the comma (as in my example).
______________________________**______________________________** __________ | Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list