-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2014-05-20 17:55, Mirko Maier wrote:
Hi List, I have (say) two bangs, one sends with the send-symbol "bang1" and the other with "bang2". Is there a possibility to get at a certain part ("myplace") of the patch easily either the numbers "1" or "2" (when hitting those bangs)? Of course one could attach each receiver to messages with these numbers [r bang1] | [1( | [s myplace]
use a graph-on-parent abstraction mybng.pd to wrap [bng] (with a send-name "$0-bng"), in there do [r $0-bng] | [list prepend $1] | [s myplace]
and use it [mybng 1], [mybng 2],...
fgasdmr IOhannes
You could do a massive search and replace and change the "r" in "r bang[0-9]+" to "r-say-my-name".
Then make an abstraction named r-say-my-name.pd that has the following inside it:
[r $1] | [bang] | [symbol $1] | [outlet]
That will get you the name of the receiver, which you can send to "myplace". If you want to extract the "1" off the end you need to use some externals to split your symbol. (Sorry, I can't remember which ones can be used to do that job atm.)
-Jonathan