Good optimization techniques/tips

goncalogato's icon

Hello,

Anyone can tell me where I can find good ways to optimize patches in Max/MSP. I want to be able to redesign patches so that they use less cpu...

Thanks!

Luke Hall's icon

It depends a lot on the patch and what it is you are trying to do, be it audio, MIDI or video processing. One thing to get you started is to remove any GUI objects that you don't need. Lots of people use the [button] object which uses up a little processing power to draw to the screen when something like [t b] would work just as well without the cost. Removing instances of number boxes that aren't used for display or editing is also a good idea although unless you have loads of them in your patch the difference it will make is still quite small. Maybe post some example patches so we can take a look. If you're feeling adventurous you could try to rewrite your patches (or portions of them) in C where you get a whole lot more control!

Peter McCulloch's icon

You'll definitely need to be more specific. There are several threads on efficiency. If it's video, check out the openGL objects; if it's audio, learn poly~ very well, since it allows you to turn off unused voices and downsample, but these are very general solutions.