Hi there:
I am stuck on something very very simple but I can't seem to explain what happened......
Its about making simple float accumulator/counter patches. It sometimes work, but sometimes not and I can't figure out what makes it work or not work.
The attached patch contains two counters, one of which works but the other doesn't. However, the failed one is duplicated from the one that works apart from changing [+ 0.1] to [+] afterwards. The duplicated one fails after one cycle.
Could anyone take a look and educate me?
Many thanks
CHUN
#N canvas 108 177 472 229 10; #X obj 25 88 f; #X floatatom 86 66 5 0 0 0 - - -; #X obj 82 147 sel 1; #X obj 25 32 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 41 60 0; #X floatatom 25 122 5 0 0 0 - - -; #X obj 70 88 + 0.1; #X obj 82 124 >= 3; #X obj 189 93 f; #X floatatom 250 71 5 0 0 0 - - -; #X obj 246 152 sel 1; #X obj 189 37 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 205 65 0; #X floatatom 189 127 5 0 0 0 - - -; #X obj 246 129 >= 3; #X obj 234 94 +; #X obj 250 16 loadbang; #X msg 250 43 0.1; #X obj 25 -5 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 42 -4 <-bang here; #X text 192 176 this one fails after one cycle; #X connect 0 0 5 0; #X connect 0 0 6 0; #X connect 0 0 7 0; #X connect 1 0 6 1; #X connect 2 0 4 0; #X connect 3 0 0 0; #X connect 4 0 0 0; #X connect 6 0 0 1; #X connect 7 0 2 0; #X connect 8 0 13 0; #X connect 8 0 14 0; #X connect 8 0 15 0; #X connect 9 0 15 1; #X connect 10 0 12 0; #X connect 11 0 8 0; #X connect 12 0 8 0; #X connect 14 0 10 0; #X connect 15 0 8 1; #X connect 16 0 17 0; #X connect 17 0 9 0; #X connect 18 0 3 0; #X connect 18 0 11 0;
Hi, this happens when you connect a single outlet to more than one inlet (the order of message passing depends on which connection you did first). If you want total control of the execution order use trigger.
Saludos
Mirko
On Dec 6, 2004, at 10:34 PM, chun lee wrote:
Hi there:
I am stuck on something very very simple but I can't seem to explain what happened......
Its about making simple float accumulator/counter patches. It sometimes work, but sometimes not and I can't figure out what makes it work or not work.
The attached patch contains two counters, one of which works but the other doesn't. However, the failed one is duplicated from the one that works apart from changing [+ 0.1] to [+] afterwards. The duplicated one fails after one cycle.
Could anyone take a look and educate me?
Many thanks
CHUN
#N canvas 108 177 472 229 10; #X obj 25 88 f; #X floatatom 86 66 5 0 0 0 - - -; #X obj 82 147 sel 1; #X obj 25 32 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 41 60 0; #X floatatom 25 122 5 0 0 0 - - -; #X obj 70 88 + 0.1; #X obj 82 124 >= 3; #X obj 189 93 f; #X floatatom 250 71 5 0 0 0 - - -; #X obj 246 152 sel 1; #X obj 189 37 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 205 65 0; #X floatatom 189 127 5 0 0 0 - - -; #X obj 246 129 >= 3; #X obj 234 94 +; #X obj 250 16 loadbang; #X msg 250 43 0.1; #X obj 25 -5 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 42 -4 <-bang here; #X text 192 176 this one fails after one cycle; #X connect 0 0 5 0; #X connect 0 0 6 0; #X connect 0 0 7 0; #X connect 1 0 6 1; #X connect 2 0 4 0; #X connect 3 0 0 0; #X connect 4 0 0 0; #X connect 6 0 0 1; #X connect 7 0 2 0; #X connect 8 0 13 0; #X connect 8 0 14 0; #X connect 8 0 15 0; #X connect 9 0 15 1; #X connect 10 0 12 0; #X connect 11 0 8 0; #X connect 12 0 8 0; #X connect 14 0 10 0; #X connect 15 0 8 1; #X connect 16 0 17 0; #X connect 17 0 9 0; #X connect 18 0 3 0; #X connect 18 0 11 0;
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list
On 7/12/04 7:43 am, "IOhannes m zmoelnig" zmoelnig@iem.at wrote:
Mirko Petrovich wrote:
first). If you want total control of the execution order use trigger.
i would say: use trigger each and everytime it is possible; only you no trigger, if you want to give away control on purpose (but be aware of it!)
Thanks, I will use trigger to correct the mistakes.
Cheers
CHUN
mfg.a.dsr IOhannes
Hi Mirko:
On 7/12/04 3:12 am, "Mirko Petrovich" prab@terra.cl wrote:
Hi, this happens when you connect a single outlet to more than one inlet (the order of message passing depends on which connection you did first). If you want total control of the execution order use trigger.
Thanks, I was suspecting this might be the case. Thanks for the confirmation.
Cheers
CHUN
Saludos
Mirko
Hallo, chun lee hat gesagt: // chun lee wrote:
Its about making simple float accumulator/counter patches. It sometimes work, but sometimes not and I can't figure out what makes it work or not work.
Two additional remarks: Personally I find it easier to always make int counters, then modify those as needed. The practical reason is, that then you can use [mod] which is great for wrapping counters. (I'll let Mathieu explain the mathematical reasons, which involve the theory of Enumerability and Countablility. ;)
Second: It took me a while, probably years, to realize, that it will solve almost any problem with counting, if you do *not* conenct the main [f] outlet directly to the [+ 1], but instead put the [mod] in between those two like the right counter in attached patch. It's a simple change, but in most cases it is the Right Thing to do instead of fiddling with [sel] and relatives.
Frank Barknecht _ ______footils.org__
Second: It took me a while, probably years, to realize, that it will solve almost any problem with counting, if you do *not* conenct the main [f] outlet directly to the [+ 1], but instead put the [mod] in between those two like the right counter in attached patch. It's a simple change, but in most cases it is the Right Thing to do instead of fiddling with [sel] and relatives.
I'll second that - it allows you to change the max value at which it wraps to zero, without disrupting its progression.
On Tue, 7 Dec 2004, Frank Barknecht wrote:
Its about making simple float accumulator/counter patches. It sometimes work, but sometimes not and I can't figure out what makes it work or not work.
Two additional remarks: Personally I find it easier to always make int counters, then modify those as needed. The practical reason is, that then you can use [mod] which is great for wrapping counters. (I'll let Mathieu explain the mathematical reasons, which involve the theory of Enumerability and Countablility. ;)
Heh. Well, I use [mod] in my counters, but it's not particularly because of that. It's because I don't want two messages to be sent whenever the counter gets reset, as further objects may expect a steady stream of numbers (I often use counters as extensions of [metro]). BTW in school I learned to configure 74XX 4-bit counter chips to loop at something else than 16, and it involved making a [sel] out of logic gates and using that to trigger a reset... but that's ok only because those chips don't do messages, only signals.
Countability :-) is something entirely different, which is both a favourite topic of mine and completely outside the scope of pd. (Well, except maybe just for saying that real numbers aren't real, that it's just a name, and that floats are a different thing, unlike whatever PASCAL accidentally insinuated and indoctrinated)
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju