Forums > MaxMSP

dynamically assign Send/Receive-parameter names. possible?

February 17, 2009 | 2:23 pm

I have something i haven’t found a solution to yet, maybe you guys can help me out.
let’s say i have a patch which uses some send/receive objects. if i now want to load the same patch a second time, so that i have two individual patches, the send/receive-objects will interfer because they have the same name-argument.
is there a possibility, that dynamically assigns a name to a send-object.

for example in the original patch the send object is call „s XYZ", when i now load the same patch the second time, the send in the new patch will be automatically named „s XYZ2". The third patch will have „s XYZ3" and so on.

is this possible and can somebody push me into the right direction?


February 17, 2009 | 2:38 pm

Changing the destination of a send is not possible. However you can use [forward] object for that purpose.

HTH,


February 17, 2009 | 2:49 pm

#0 is your friend.

This is in the tutorials/reference somewhere – check it out.

If you put #0 in front of a symbol in a patch it will be replaced with a unique patch identifier number when you load the patch

Regards,

Alex


February 17, 2009 | 2:55 pm

thanks a lot guys.


February 17, 2009 | 5:23 pm

Just to chime in, changing the destinations of send~ and receive~ is possible with the "set" message – though #0 should work equally well, the set message may give you better control in other circumstances.


Viewing 5 posts - 1 through 5 (of 5 total)