Forums > MaxMSP

how to use "send" in more advanced ways

Nov 10 2013 | 4:36 pm

I’m looking to create multiple instances of a send and receive object to acquire their name/target based on the parent device id.

so that multiple instances of an m4l device in an ableton rack could send messages to each other, without interferring with m4l instances in another device.

I’ve seen some advanced usage of the send object before, but its not in the manual. I’d love to learn everything I can about that amazing nebulous thing.

Nov 10 2013 | 5:18 pm

Something like this ?

-- Pasted Max Patch, click to expand. --


Nov 10 2013 | 5:30 pm

Actually this is probably more what you’re looking for:

In you sub patch if you write #1 in your receive object as argument, the #1 will get replaced by the patcher’s argument.

Nov 10 2013 | 5:47 pm

i #0
prepend set
forward, receive

Nov 11 2013 | 12:37 am

@110 modular im not sure what you mean there, but i do recall # being very useful with these objects. its not in the documentation.

Nov 11 2013 | 12:38 am

@nat, ill take a look at the zip

Nov 11 2013 | 12:43 am

its not clear though how i could dynamicly rename a send and recieve object based on the current instance on an m4l device by using something like an id

#1 is still locked to the name of the parent patcher which is typed manually by me when its created.

Nov 11 2013 | 1:23 am

You can use a device id for naming and renaming send/receive objects dynamically.

-- Pasted Max Patch, click to expand. --


Nov 11 2013 | 8:25 am

You also want to check out the forward object as well as try giving receive no arguments. Both of these will allow you to change targets dynamically.

Caveat: send and receive are not super reliable in terms of timing in M4L. (I think this is still the case)

Nov 13 2013 | 10:25 pm

Ill definitely check it out. sorry if this is a double post, browser went weird.

Nov 16 2013 | 2:25 am

thats really helpful@ I’m wondering though, if i have 256 instances of some bpatcher, how can i set them all to a unique recieve easily without having to connect up 256 patch chords to a "set" message on each of them? is there a method to do this procedurally possibly?

Nov 16 2013 | 11:00 am

the other situation that arises from this approach that I need to append an id based on the current m4l instance. i believe there was some ability to use #0 or @1 or something like that but searching for these strings tends to break search engines.

Nov 17 2013 | 12:52 pm

i got something going. its quite large though.

basically all the instances send their ids out to be received. then the hub gets that list of ids and can send messages out to those ids. it means that the bpatchers dont have to have wires connected and you can just copy past to make as many instances as you want. it would be good if they could be aware of their position in the path to determine some kind of execution order. its random at the moment.

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

Forums > MaxMSP