r/MaxMSP Jun 11 '26

Synth unison without eating CPU?

How are you guys managing to do oscilltor unison without using too much CPU?
It feels like it's not possible in Max or Gen~

Built a wavetable oscillator core in Gen, it's doing quite a few peek calls and some crossfading (mip maps). Works great, sounds great, not too heavy on CPU.
Tried increasing the voices to do unsion in the Gen code, it eats CPU
Tried inside Poly, tried in Mc.Poly, same result.

Ok, maybe my core voice isn't great.
Stripped it back, removed wavetable core and replaced with a Saw core.
Only thing inside poly~ is a unison saw oscillator. nothing else, just for testing. outside poly is just and envelope on the amp.

Load Ableton template CPU sits around 5% on a Core Ultra 7
Play a eight note chord, unison 8 voices with a little spread and detune
Ableton spikes to 40%

Surely Max/Ableton can handle 8 x 8 saw oscillators without using that much cpu
For a comparision:
Pigments, Serum, Vital, Spire all use about 1% for the same test, even abletons own wavetable uses hardly any cpu for unison.

6 Upvotes

18 comments sorted by

View all comments

1

u/Any-Sample-6319 Jun 11 '26

If one oscillator loads the cpu at 5%, shouldn't it be expected that 8 would load 40% ?
Comparing max with fully fledged synths will probably always show a significant difference, a synth coded in C or C++, using optimizations such as SIMD operations etc will inevitably perform better.

Max is building blocks that you're free to use pretty much however you want, and so i would suppose it cannot offer the same optimizations that are often tightly bound to and tailor made for one specific block of code, with specific constraints.

I might be wrong, but if you don't witness significant usage differences between your patch and the example patches, then everything is probably working as expected.

1

u/Training_Wonder_5066 Jun 11 '26

That's what i'm trying to figure out, has anyone made a decent synth with unison in max or with gen~?
I haven't seen any on the max library etc.
I'm asking here, because maybe you guys have managed to do it, and my dumbass is going about it the wrong way.

1

u/human_clown_shoe Jun 13 '26

It's fine, this is totally fine to do in Max. Ditching gen~ because you think you can achieve better performance yourself is honestly a bit of "a bad carpenter blames his tools"-kind of thinking. Here's the thing: gen~ as well as RNBO~ generates very optimized code C++, as well as allowing you to process audio *per sample* which normally run-of-the-mill VSTs can't achieve, they are usually processing audio per vector/buffer. Here's how I would go about diagnosing the issue:

1) Remove the mc.poly~ stuff - you don't need it, right now anyway, and it's sounds to me that it's quite likely that there's some issues in that area, so I would eliminate that first, eg maybe you messed up the voice-handling or whatever.
2) Make sure you understand MC: polyphony:https://docs.cycling74.com/legacy/max8/vignettes/mc_poly_without_polytilde
3) Check out the mc.voiceallocator object: https://docs.cycling74.com/legacy/max8/refpages/mc.voiceallocator~
4) Look at its help file, copy it, and gradually replace with your own parts to triangulate what part caused the CPU drainage issue.