Quick and efficient way to differentiate between patch instances?

Dr. Spankenstein's icon

I have multiple instances of a single patch. Is there a way to send and receive messages (preferably wireless) to a specific patch instance without renaming all the receive objects in each patch?

Max Patch
Copy patch and select New From Clipboard in Max.

Otherwise a sent message is received by all patch instances.

The only method I can think of is prepending each message with a number and then using a routing method inside each patch.

pdelges's icon

One way is to use #1. Check the attachment.

p

4518.untitledfolder.zip
zip
Dr. Spankenstein's icon

That looks promising. I will have to rename all the receive objects then.

This method in combination with a forward object will tidy things up a great deal, thank you.

Dr. Spankenstein's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Can anyone explain why option 1 in the patch doesn't work yet option 2 does?

It is not terribly important, I'm just curious. I'll go with option 2 if option 1 isn't viable.

pdelges's icon
Max Patch
Copy patch and select New From Clipboard in Max.

A comma in a message box is equivalent to 2 successive messages. With sprintf you're not generating 2 messages. See this:

Dr. Spankenstein's icon

Cool. That's clear now. Thanks again.