hi
how can i send a list of various length to a dynamically changeable receiver? has anybody done that before?
thanks eni
hi(2)
how can i send a list of various length to a dynamically changeable receiver? has anybody done that before?
if the list wouldn't have various length a message like this would work: [; $1 $2 $3(
then i tried to dynamically create that msg with some
[0
|
[makefilename %d]
|
[adddollsym $1(
|
[(
i could create the msg but it behaves slightly different. when i send [;peter 1 2( there is a "1 2" coming out of [r peter] but somehow any object i use complains.
some examples with [;peter 1 2(
[unpack f f] error: unpack: type mismatch
[list split 1] | [f] error: float: no method for 'symbol'
[$1( gives the second instead of the first atom
is there an other way instead [; $1 $2 $3( ?
regards eni
On Sat May 13, 2006 at 10:03:06AM +0200, Enrique Erne wrote:
hi
how can i send a list of various length to a dynamically changeable receiver? has anybody done that before?
[send13] is like [s] but accepts [set symbol( . or you could use the new [list] object if it has a "length" method to route to a precreated set of messageboxes for the common lengths ( the reciever is implied to be $1, in [$1 $2;( ) eg [$1 $2 $3 $4 $5(. note i havent tried the latter technique and its praobly subject to the usual selector caveats.. but give it a try if you have a fetish for not using externals..
thanks eni
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hallo, Enrique Erne hat gesagt: // Enrique Erne wrote:
thank you carmen and frank for your fast reply!!!!!
Btw: Another solution, which I generally prefer to use, is to keep a fixed send/receive name, but add a [route] after the receiver. Basically the idiom for this is:
[1 abc( | | [2 x y z( |/ [s $0-CONNECT]
[r $0-CONNECT] | [route 1 2] | | "abc" "x y z"
This also works great with abstractions, if you "tag" them with an argument and use [route $x] inside the abstraction.
choose.pd:
[r $2-CONNECT] | [route $1] | "do something"
and use it as:
[choose 1 $0] [choose 2 $0] [choose 3 $0] [choose /by_name $0] ...
This approach is at the base of RRADical/Memento and also used in my [sssad] abstractions.
Frank Barknecht _ ______footils.org_ __goto10.org__
Hallo, Enrique Erne hat gesagt: // Enrique Erne wrote:
how can i send a list of various length to a dynamically changeable receiver? has anybody done that before?
There are various ways, one with only core Pd objects is attached.
Frank Barknecht _ ______footils.org_ __goto10.org__