hi
maybe it's an often asked question. suddenly i couldn't find the topic in the list.
is there a way to change sendsymbol of a [send]-object dynamically?
i'd like to create abstractions by messages. i know you can send messages using a message-box like [; 'sendsymbol' 'message' bla bla]. the problem is that i don't know the length of the messages. i tried that with a msg-box like [; $1 $2 $3 $4 $5 $6 $7 $8$ 9] and let the messages into this box. this works. also the patch, i created this way, works, but it's very ugly, because the objects look like this: [metro 500 0 0 0] [bang 0 0 0 0].
[send] with right inlet would be nice.
roman
I read:
is there a way to change sendsymbol of a [send]-object dynamically?
I find using maxlib's dist for this purpose very convenient. There is a patch floating around that allows to use set messages to change the destination of a send object, and you can of course use messages to the canvas to generate an appropriate [send somewhere] on the fly.
HTH
x
thank you for the hint. this is what i was looking for.
it would work well, but for my intention to create a patch by sending messages to a canvas, i encountered another problem: a collision between [dist]-syntax and pd-syntax: for creating new patches it's needed to send messages like [connect 0 0 2 0]. [dist] interpret it as a request to connect with "". may a mixture of [dist] and [$0 $1 $2 ...] would work.
or would it make sense rewrite this object and using instead of 'connect' and 'disconnect' , 'add' and 'remove' (like an item of a list)?
roman
----- Original Message ----- From: "CK" x@meta.lo-res.org To: "Roman Haefeli" reduzierer@yahoo.de Cc: "post pd-msg" pd-list@iem.kug.ac.at Sent: Sunday, May 30, 2004 6:16 PM Subject: Re: [PD] change sendsymbols dynamically
I read:
is there a way to change sendsymbol of a [send]-object dynamically?
I find using maxlib's dist for this purpose very convenient. There is a patch floating around that allows to use set messages to change the destination of a send object, and you can of course use messages to the canvas to generate an appropriate [send somewhere] on the fly.
HTH
x
-- chris@lo-res.org Postmodernism is german romanticism with better http://pilot.fm/ special effects. (Jeff Keuss / via ctheory.com)
PD-list mailing list PD-list@iem.at to manage your subscription (including un-subscription) see http://iem.at/cgi-bin/mailman/listinfo/pd-list
Hallo, Roman Haefeli hat gesagt: // Roman Haefeli wrote:
maybe it's an often asked question. suddenly i couldn't find the topic in the list.
is there a way to change sendsymbol of a [send]-object dynamically?
Some more ideas:
use the [sprinkler] external from CVS
use fromsymbol/tosymbol rsp. l2s/s2l to change your messages to be just a symbol, then use prepend from Cyclone to prepend a set-able send-symbol, send this to [; $1 $2(
Reformat and send your messages by using OSC. OSC can send lists of arbitrary length, you can easily build the targets with makefilename and similar objects, then prepend the lists to send by the target.
Rethink your logic: Is setting the sends really necessary? Do you really need arbitrary length? Of course sometimes it is, but sometimes it is not.
Those are just some ideas - what you should use depends on the particular problem at hand.
Frank Barknecht _ ______footils.org__
Frank Barknecht:
- Reformat and send your messages by using OSC. OSC can send lists of
arbitrary length,
Or you can use a little abstraction I just built using Zexy's lister object. Basically you send it any message and it will push it onto the front of a list. First inlet takes a bang to output the whole list, second adds elements and outputs the new list, third inlet resets. Hope it can be of some help.
-ish
Hallo, Ian Smith-Heisters hat gesagt: // Ian Smith-Heisters wrote:
Or you can use a little abstraction I just built using Zexy's lister object. Basically you send it any message and it will push it onto the front of a list. First inlet takes a bang to output the whole list, second adds elements and outputs the new list, third inlet resets. Hope it can be of some help.
I get several errors, maybe because I prefer the Cyclone prepend, which is compatible with the Max prepend, and you probably use some other prepend. Does your prepend have two inlets?
My error is: dynamic_list.pd 1 0 4 1 (inlet->prepend) connection failed dynamic_list.pd 3 0 4 1 (lister->prepend) connection failed
Frank Barknecht _ ______footils.org__
'Frank Barknecht' wrote:
Hallo, Ian Smith-Heisters hat gesagt: // Ian Smith-Heisters wrote:
Or you can use a little abstraction I just built using Zexy's lister object. Basically you send it any message and it will push it onto the front of a list. First inlet takes a bang to output the whole list, second adds elements and outputs the new list, third inlet resets. Hope it can be of some help.
I get several errors, maybe because I prefer the Cyclone prepend, which is compatible with the Max prepend, and you probably use some other prepend. Does your prepend have two inlets?
My error is: dynamic_list.pd 1 0 4 1 (inlet->prepend) connection failed dynamic_list.pd 3 0 4 1 (lister->prepend) connection failed
Ciao
Oops. That's no good. I'm using a prepend with two inlets. The copyright on the help patch is "musil@iem.kug.ac.at IEM KUG graz, austria 2003." so I'm guessing that I'm using the one from iemlib_R1.5. I guess my 'useful little patch' is pretty useless if it doesn't work. But as you see, it's not that complex and should be easy to replicate with any prepend/append object and lister.
-Ian
Hallo, Ian Smith-Heisters hat gesagt: // Ian Smith-Heisters wrote:
Oops. That's no good. I'm using a prepend with two inlets. The copyright on the help patch is "musil@iem.kug.ac.at IEM KUG graz, austria 2003." so I'm guessing that I'm using the one from iemlib_R1.5. I guess my 'useful little patch' is pretty useless if it doesn't work.
Ah, but that's not your fault. [prepend] is quite common, there even was a third one (now [prepend2]). As you see, those name clashes can get you into a real mess. There should be a general consensus, on which one to use. My vote is for Cyclone prepend.
Frank Barknecht _ ______footils.org__
Frank Barknecht wrote:
- Rethink your logic: Is setting the sends really necessary? Do you really need arbitrary length? Of course sometimes it is, but sometimes it is not.
i'd like to enforce this to: "sometimes it is necessary, but most often it is not" i do think i have made fairly complex patches in the past years and it was never really necessary to have arbitrary length lists being sent to variable [receive]s. i'd strongly suggest rethinking the logic (and consider the use of [route] and friends)
mgf.ad.r IOhannes
since this is a very frequently asked question, i offer an infrequently proposed answer, just to spice things up.
in the case of a fixed number of arguments, you can use a message object,
[; x $1 (
is the same as
[send x]
(if you only ever send one argument into the send, ie, not a list)
so you could do
[pack s f] | [; $1 $2 (
to send the float to the receive named by the symbol..
... are my 3am musings understandable to anyone but me?
pix.
On Sun, May 30, 2004 at 08:37:03PM -0400, Marc Lavallée wrote:
Le 30 Mai 2004 09:48, Roman Haefeli a écrit :
is there a way to change sendsymbol of a [send]-object dynamically?
Try "send13" from the "ext13" library.
Marc
PD-list mailing list PD-list@iem.at to manage your subscription (including un-subscription) see http://iem.at/cgi-bin/mailman/listinfo/pd-list