Opening patches in bpatcher, opening and closing patches in separate windows

themusicalduck's icon

I have a project that makes a lot of use of a set of different patches. I was wondering if there is way of doing these things -

Opening a particular patch in bpatcher. So I could click a button and have the bpatcher show something.maxpat (saved in the local folder), and then click another button and have it switch to somethingelse.maxpat. I know about using offset, but I think this way would be easier for my purposes if it's possible.

I was also wondering if there is a way to open a patch in another window, and then close that window when I'm finished with it. So if I click a button in one patch, it will open something.maxpat in a new window. Then I can click a button on that patch that will close it again, keeping the first patch open the whole time.

On a side note, is there a good place to look up things like this? Google search never seems to come up with anything useful when I try to look up Max stuff, or the forums search. Max help sometimes does, but not always.

seejayjames's icon

the bpatcher docs should tell you, there's a command for it to load a new patcher into its space. not sure of the command off the top of my head... though I seem to remember that maybe you need to delete the bpatcher and script a new one to load a different file? if so, check [thispatcher] scripting help subpatch.

For the other things, there's [pcontrol]: you can open/close patcher windows. the "load" message will let you open a new .maxpat using it. To close you can always use the window close button, or use a "wclose" message to [thispatcher] to close it. Don't use "dispose" as this kills the patch.

So with [pcontrol] you can programmatically open and close patchers, or use keystrokes etc. rather than clicking.