poly~ and patcher dynamic loading to save CPU?

Gaia_Livingston's icon

Hi everyone,

I’m looking for a way to disable inactive oscillators in a synth patch in order to save CPU.

My idea was to use poly~ with dynamic loading. Each oscillator is inside an abstraction, which I load into poly~ using the "patchername" message.

I have a question about how this works: when I load a new patcher into poly~, is only that abstraction actually loaded? In other words, when I change the patcher name, does poly~ contain only that instance and not the others, so that CPU usage is reduced right?

Thanks a lot!!

Roman Thilenius's icon

it "contains" always all instances according to the current number of voices.

you can tell by the "open 7" message.

it is required to work like that 1. because of load time and 2. because you might want to send messages into the voice instances and have them processed while the audio is off for that voice.

to save CPU it is enough to turn a poly voice (or all of its voices) off.

if you also want to completely unload stuff you can work with parallel mother patchers, call them using pcontrol, and use s/r to communicate with them.

you can also abuse bpatcher to load different contents into a sub.

these two methods of course mean you have to wait for the storage media to deliver.

Gaia_Livingston's icon

Thanks a lot, Roman! I didn’t quite understand... so if I set only one instance in poly~, I shouldn’t have any problems, right? I would just send the message “patchername mypatch.maxpat” to poly~ and it should load only that patcher…? The others I previously loaded shouldn't exist if I set only one instance in poly~, right? Thanks!