Multiple instances of the same Max plugin influencing each other

Colin Coogan's icon

Hey all, first post so plz bear with me.

I'm building a simple randomized midi sequencer in Max for Live that uses the random object to fill cells on a matrix ctrl object which then acts as a sequencer. My hope is to be able to have multiple instances of this sequencer running simultaneously and independently in the same session. Currently, separate instances of the plugin will influence each other in a variety of ways- for example, if I generate a sequence in one instance the same sequence will appear on the other instance of the plugin. I did some research and found that adding "--" to the beginning of my sends and receives mitigated some of the issues, but not all of them. I found that by saving new versions of the plugin and changing the names of the sends and receives between them solves the problem, but this is obviously labor intensive and not ideal solution as I would prefer to be able to just add new instances and have it work. Any tips to keep the sends and receives from influencing eachother, beyond just adding two dashes?

Ty in advance.

Randomizerv4.amxd
amxd 651.59 KB
Copy of the code in case that's helpful

tyler mazaika's icon

Three dashes, not two, will do what you want.

You can open your .maxpat file in a text editor with a "search" and "replace all" functionality and replace "--" with "---". Be a little careful if you do it that way, though...