sw Max For Live Edition - Cycling74 Max 8 | Ableton Live
The "sw" abstraction updated for compatibility with Ableton Live.
Sw is a useful abstraction that you can find in the Max folder "Examples/max-tricks/send-receive-tricks/" . It basically allows you to use multiple values connected to each other through the send-receive technique, but making each one both a sender and a receiver, without causing any stack overflow thanks to the usage of a swapping gate. Also, the objects "send" and "receive" themselves can inherit the arguments of the abstraction in which they're placed with the following syntax:
"#1 (1st argument), #2 (2nd argument), ... #n (nth argument)"
avoiding any interference between multiple instances of the same abstraction. In addition, if one needs to differentiate his multiple instances of the same abstraction in an automatic and random way, the send and receive objects can be written with a "#0" as an argument.
In Ableton Live, the usage of #1 and #2, etc. still works when send and receive are within the same .amxd device, but if there's any additional instance of it, it does interfere with that. In order to avoid this interference between devices, this trick used the Ableton Live "---" syntax - equivalent to the Max "#0" argument - in combination with the #1 one and the "forward" object, resulting in a combined and ordered argument for the whole abstraction that makes it independent from other instances of it, and from other instances of the whole device as well.
Inspiration here came from two distinct threads in FB groups dedicated to Max and M4L, in which Lewis Keller and Timo Hoogland especially helped me a lot.