[PD] pd-msg toggle init

IOhannes m zmoelnig zmoelnig at iem.at
Wed Feb 4 15:15:33 CET 2004

noskule wrote:
>>noskule wrote:
>>c) you can send messages to the toggle that controls all of it's 
>>features; everything is documented in doc/5.references/help-toggle.pd 
>>(there is a subpatch [pd edit] that shows quite everything)
> the problem with this is so far i'm understand . .. if i cant  give it a
> receive argument when i create the toggle by pd-msg so i cant send anything . ..
> .ore aim wrong .. ? .. ..
> but   .. if i send:
> obj 136 58 tgl 15 0 se re nme 0 -6 0 8 -262144 -1 -1 0 1 ->works
>  . ..but the problem with $0 still there . . .is there no solution like
> "\$0" to not interpret the dollarsign . .. would be nice, so all the possible
> arguments can be given by pd-msg . . .same by sending messages to the toggle .
> .. no dollarsign ..  .is there a way to work around  . .?

ok, so let me recapitulate:
you want to dynamically create an abstraction using toggles.
the toggle should receive at a label "$0-mytoggle" or the like.

now what you are trying to do is:
pass the "$0-mytoggle" somehow to the toggle so that it recognises it as 
it's receiver.
you have problems, because you don't see a way to a) create the 
"$0-mytoggle" symbol, b) to pass it to the toggle, c) to make the toggle 
realize that the "$0-mytoggle" is not just a symbol but should be 
expanded to whatever $0 means in this context.

my suggestion:
as you are building dynamic patches there shouldn't be a need for "$0" 
to be expanded to its value.
$0-expansion makes only sense when using pre-build abstractions (the 
ones you are creating dynamically)
(probably you could construct a case, where my conclusions are wrong, but)

so: you know the value of "$0" (just use [f $0]); what is wrong with 
"hardcoding" this value into the receivers ?
get $0 (say it is 1101); create your object with something like
"obj 136 58 tgl 15 0 1101-se 1101-re nme 0 -6 0 8 -262144 -1 -1 0 1"

this should give you the behaviour you need.


More information about the Pd-list mailing list