I'm not sure I understood Steffen's proposed solution, and I'm not sure whether I explained clearly what was my goal.
However, I've come up with an interesting solution (attached), which satisfies my requirements except one that is however sacrifiable. Here's what I needed. 1) Somewhere there is a [r xxx] that does something important, such as playing a sound 2) The name "xxx" is "publicly known", that is, wherever I need to play that sound under any circumstances in any part of my patch, I can trust that I can send a bang to "xxx" -- e.g. [; xxx bang( -- and that will result in the sound being played once. 3) Somewhere in the patch I want to place ONE OR MORE [bng] objects, with their "send symbol" and "receive symbol" (in the bng properties) set to "xxx-if-send" and "xxx-if-receive" respectively (or any other convention such that the send and received symbols can be deduced from the control name "xxx") 4) Every time that you click _any_ of the [bng]s, one and only one bang is sent to "xxx". 5) Every time that a bang is sent to "xxx" from any source other than the gui [bng]s, _all_ the [bng]s flash 6) Every time that you click any of the [bng]s, all other [bng]s visually flash as well. 7) Somewhere there's an instance (or as many instances as needed, depending on how it works) of an abstraction with "xxx" as an argument, that make everything work as described. b) Obviously, you can repeat all this with any other control name. Now, the attached example works as described except for point (6): when you click one bng, the message is sent to the target but the other bngs don't flash; however I'm quite fine with that. When a bang is sent from an "external" source, the [bng]s do bang. Look at the attached patch "example_control_bang.pd", which uses the [control_bang] abstraction. Thanks for the suggestions. Bye m. 2008/3/18, Steffen Leve Poulsen <[EMAIL PROTECTED]>: > matteo sisti sette skrev: > > Hi, > > > > Is there a way to make a [bng] visually "flash" (the same it does when > > you click it or send it a bang) WITHOUT making it output/send a bang? > > > Hi, Mattteo > > you can use: > > [t a b] > | | > | [visual bang here] > [route bang] > > > mvh/ slp > > -- Matteo Sisti Sette [EMAIL PROTECTED] http://www.matteosistisette.com
#N canvas 375 45 837 568 12; #X obj 45 87 bng 15 250 50 0 dosomethingelse-if-send dosomethingelse-if-receive do_something_else 17 7 0 10 -262144 -1 -1; #X obj 45 59 bng 15 250 50 0 dosomething-if-send dosomething-if-receive do_something 17 7 0 10 -262144 -1 -1; #X obj 193 86 bng 15 250 50 0 dosomethingelse-if-send dosomethingelse-if-receive do_something_else 17 7 0 10 -262144 -1 -1; #X obj 193 58 bng 15 250 50 0 dosomething-if-send dosomething-if-receive do_something 17 7 0 10 -262144 -1 -1; #X msg 38 280 \; dosomething bang; #X msg 37 321 \; dosomethingelse bang; #X obj 416 53 r dosomething; #X obj 416 115 print; #X msg 416 85 I'm actually doing something; #X obj 415 207 print; #X obj 415 145 r dosomethingelse; #X text 431 322 And here's an automated piece of patch; #X obj 434 351 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 434 373 metro 1000; #X obj 434 401 random 2; #X obj 434 429 select 1 0; #X obj 434 460 s dosomething; #X obj 471 488 s dosomethingelse; #X text 542 376 The guy who wrote this doesn't want; #X text 542 394 to care about my gui weirdnesses; #X msg 415 177 Believe me I'm actually doing something else; #X obj 37 143 control_bang dosomething; #X obj 36 173 control_bang dosomethingelse; #X connect 6 0 8 0; #X connect 8 0 7 0; #X connect 10 0 20 0; #X connect 12 0 13 0; #X connect 13 0 14 0; #X connect 14 0 15 0; #X connect 15 0 16 0; #X connect 15 1 17 0; #X connect 20 0 9 0;
#N canvas 121 116 749 492 12; #X msg 274 194 0; #X msg 312 194 1; #X obj 217 102 r \$1; #X obj 261 222 spigot 1; #X obj 261 279 s \$1-if-receive; #X msg 440 195 0; #X msg 478 195 1; #X obj 427 223 spigot 1; #X obj 383 139 t b b; #X obj 261 251 t b b b; #X obj 427 252 t b b b; #X obj 383 103 r \$1-if-send; #X obj 427 280 s \$1; #X obj 217 138 t b b b; #X connect 0 0 3 1; #X connect 1 0 3 1; #X connect 2 0 13 0; #X connect 3 0 9 0; #X connect 5 0 7 1; #X connect 6 0 7 1; #X connect 7 0 10 0; #X connect 8 1 7 0; #X connect 9 0 4 0; #X connect 9 1 0 0; #X connect 9 2 5 0; #X connect 10 0 12 0; #X connect 10 1 5 0; #X connect 10 2 0 0; #X connect 11 0 8 0; #X connect 13 0 6 0; #X connect 13 1 1 0; #X connect 13 2 3 0;
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
