how do I create a Patch that calls other patches?

Themos Pentakalos's icon

Hi. I am very new. I have 12 separate patches/modules, which work fine independently. I want to choreograph launching them from a single program so that I can create a sequence and then output record the entire sequence.

I am having a hard time opening a file. I've also used ChatGPT and it can't figure out how to do it.

I want to open file 1, execute it, then, once it's done, launch file 2, etc.

Any help would be appreciated.

Thank you!

Beginner

TFL's icon

Check [pcontrol] to load patchers from files. It (and also [thispatcher]) can be used to close a window/patch.

If you work with sound, you might be interested in [poly~] which allows you to load different patchers to different voices.

Themos Pentakalos's icon

Thanks. I am not trying to open subwindows. Here is what I am trying to do. From the master patcher, I want to load the first module, in this case 01.maxpat, and then 720000 ms later, open the second module, 02.maxpat.

TFL's icon

If you want 02 to be opened exactly 720000ms after 01, you need to connect [delay 720000] inlet to [delay 100] outlet. Otherwise, 02 will be opened 719900ms after 01.

If you want to be able to close these patch, you'll have to do it from inside them by sending a dispose message to [thispatcher].

If I knew what you want to record (sound? image? both? other kind of data?) and how, I could give better advice.

Themos Pentakalos's icon

Oh sorry, yes, this is all audio signals. It's a lengthy session that takes a user through several stages. Some stages start sequentially and some start in parallel. There is a total of 12 modules over about a 60-minute audio session. All the individual modules work fine standalone. I just want to create a master patcher to trigger them and orchestrate them. I may need to swap out audio signals for individual modules but I want the master to start all of them in the proper sequence, so that I can record the entire output into a single audio file of 60 minutes long.

Thank you very much for your help!

Themos Pentakalos's icon

Here's perhaps another way to show you want I want to do:

Open the Master Patcher. Run module one. 720000 seconds later, fade out module one, and start running module 2. 400000 seconds later, fade out module 2 and start both modules 3 and 4 in unison. Then, etc...

Roman Thilenius's icon

quickly forget that loadbang-->delay stuff. we all did that in our first weeks, but it is yuck.

without knowing your exact project i would propose to open the second patch one from the first patch. this will still work when the time varies, among other things.

Themos Pentakalos's icon

Sorry I am not sure I understand what you mean "open the second patch from the first patch". What does that look like?

Source Audio's icon

It is not a big deal to load/close patchers, but it makes less sense

in this case where you record continuous audio.

Stuff all audio parts into single subpatcher, and play with

GUI to create that effect of 12 modules for users.

One single clocker set to output at 1000 ms interval

would be better to trigger that 12 modules.

TFL's icon

Agree 100% with source audio approach, simplest way to do what you want.

If you cannot run all your patchs at once because some of them are too resource-hungry, you can disable them once they are not in use by sending a enable 0 message to [pcontrol] connected to the patch to disable. Another option is to use [mute~]. Examples for both options can be found in the mute~ help patch.

You mentioned that you would want to fade between patchs, so that would means that once a new patch gets enabled, its output volume turns up while the previous patchs output volume turns down, and once it's all the way down, you can disable that previous patch.

Themos Pentakalos's icon

Thank you for your help!