Best way to manage DSP usage

arockmez's icon

Hi everyone:

I'm using now Max 7 and i'm working in a project where i need to load several patchers and subpatchers but sometimes some of them are unused but can't be removed or closed, so i'm trying to find out the best way to remove them from the DSP to save DSP usage.

I'm not using poly~ in every patch so i can't use poly~'s internal mute message but i'm trying to do kinda the same thing that poly~'s mute does but with a single patcher and it's subpatchers without affecting the rest. I read about begin~, pass~ and mute~ but maxhelp file says they are old objects so i'm a bit confused about which should be the best way to keep DSP usage at bay.

Thank you in advance for your help!

arockmez's icon

Is there anybody out there? :(

Mike S's icon

Yes, I'm here.

How come you don't fancy poly~?

arockmez's icon

Hi MIKE S!

i don't mess with poly~ because i need to create and remove objects in real time and they are already formatted as a common subpatcher and it fits my needs, so im looking for another method, i'm a little surprised it seems there's no other method to manage DSP usage in a common subpatcher :(

Mike S's icon

Hmm, I'd have to see the patch. Generally I have a UI component, then various poly~ patches with things in - sometimes I'll make a 'dummy' poly~ patch that just has the ins and outs but lets the signal through.

Have you looked at scripting messages to thispatcher? It can get a bit longwinded but you can delete/create objects and connections on the fly

arockmez's icon

Yes i know thispatcher, i have a whole system based on javascript/pattrforward/thispatcher to work on presentation mode and delete/create subpatchers (with UI) that's why it's not that simply for me to switch everything to poly~. Patcher's signals are going to a mixing console (another Max patcher with bpatchers for every channel) so, the fastest way to switch to poly~ is creating several poly~ of one voice each, i don't know if it would work as expected

Christopher Dobrian's icon

Here's an example from many years ago. (The use of the 'enable' message to pcontrol for this purpose is deprecated, but still works.) The key example is number IV, but it uses examples I and III as abstractions. http://music.arts.uci.edu/dobrian/IAP2004/MSPExamples.htm

Christopher Dobrian's icon
arockmez's icon

Thank you all for answering. I've tested mute~ and read about it. Even when mute~ hushes a patch, the DSP is still computing the processes inside the patch so DSP is still the same with or without mute~ and i'm trying to reduce DSP usage to the minimum, it's seems poly~ is the only way :(

Christopher Dobrian's icon
Max Patch
Copy patch and select New From Clipboard in Max.

FWIW, I think this patch demonstrates that mute~ does indeed halt the computation in a subpatch.

arockmez's icon

Thank you Christopher Dobrian! it seems it does work, but i'm still curious about a thing:

I have loaded the same patch as an abstraction and as a 1 voice poly~ and muting poly~ reduce DSP usage much more than muting the abstration with the mute~ message, the first, like 10% and the second one like 1% (that's why i thought mute~ doesn't work but you were right, it does)...why could this happen? i don't know if it's a general rule or something i'm missing.

I'm running everything in a MacBook Pro 13-inch mid 2012 with Mountain Lion 10.8.2

Here is the patch with all it's files *next post, i couldn't upload them to the forum*...the patch was a homework for a lecture so maybe it's not the best design for granular synthesis and it wasn't meant to be used as a poly~ or as an abstraction so i could be missing something related with that and mute~ vs. poly~. I'm still trying to figure out what's going on. You should open imaDSPtest.maxpat

both.png
png
poly-only.png
png
mute-only.png
png
arockmez's icon