bPatcher Windows opening multiple times in Live 12

Eptiar's icon

I'm currently trying to make a Max4Live device. For context, I've got a good bit of experience with Max as a standalone software. However, have only just started integrating it into my Live sessions.

I'm making a device where the bpatchers are being opened with some text buttons that are on the main UI. The bPatchers are just FM oscillators with the typical parameters that would take up too much space on the main UI area. Anyway, everything works perfectly fine until more than one instance is active in Ableton Live. If I have two instances of the instrument within live, when I click the button to open the bpatcher window it opens two. And it's the same if I have three instances of the instrument in live, just instead of two windows opening, it'll open three. And so on.

I'm pretty bad when it comes to understanding the script names and whatnot in Max, but I have tried a couple of things to no avail.

Any advice would be greatly appreciated!

Rei Kurosawa's icon

Could you post the small section of the patch that connects one text button to the message that opens its bpatcher window? Include any send/receive objects or scripting messages along that path, with their exact names. The oscillator internals can stay out of the example.

Eptiar's icon

Sure thing! Here's the .amxd file. I've left a comment to try to explain a little further. Let me know if you'd need anything else, or would rather the patch as a .maxpat

FMD_For_Forum.amxd
amxd 1.01 MB


Rei Kurosawa's icon

In your file, button 1 uses s #0.Open and r #0.Open. For the Max for Live test, change that pair to s ---Open and r ---Open, then save and reload two instances of the device. Cycling's documented device-local prefix is ---, which Live replaces with a unique number when the patch initializes.

Eptiar's icon

Thank you so much! I had no idea about that. I'll be keeping that in mind for future patches too. Once again, thank you. That's worked perfectly <3