Optimization Tips

Hey guys! I was wondering if any of the more experienced builders and math wizards among us could help to point out some optimizations that can be made to this patch? It is using hella CPU with all other apps closed except Gadget or one of the Korg synth app (Mono/Poly, ODYSSEi, Electribe Wave, etc. and only one at a time), A3 (obviously), and AudioBus 3.

I only have 4 total voices for unison with all inner effects turned off. It is basically as dumbed down as it can be, and when I open the effect patch on my iPhone XS Max, it becomes a crackle fest for a minute or two, then Audulus ends up freezing and having to be restarted. Any help, pointers, or explanations for this behavior that can be offered are appreciated. Thanks! :slightly_smiling_face:

Gadget Stagger Effect.audulus (30.9 KB)

Edit: if anyone wonders why on earth I would be using my iPhone when I have an iPad Pro and a MacBook at my disposal, I don’t have gadget for Mac, although I may end up buying it, and my iPad is currently being brought back from the dead on the charger lol

1 Like

Actually the biggest CPU savings would come from replacing the LFO with a simple sin() LFO from the library. You could also replace the internal triangle oscillator with a phasor based design but that probably won’t save much. The rest of the module is totally “fat free”. Unfortunately that many delays and reverbs just use a fair bit of CPU. You could always split it in half but you’d lose depth in the effect.

1 Like

Well, on the one hand that is a bummer that there are only the two small things, but on the other, I always appreciate adding more to my knowledge bank account balance for later usage :slightly_smiling_face: what is the reason that those two things use so much more CPU than the suggestions you made (if you have time to explain, I always prefer to gain wisdom and experience whenever I am able to from my mistakes)?

Because both reverb and delays have internal feedback loops, they require single sample processing rather than processing the audio a frame at a time. The same is true of filters. The delay and reverb nodes aren’t too bad since they’re written in C and precompiled but stack up a bunch of them and it adds up. Not really a lot you can do other than reduce the number of nodes or use a faster machine. You might try different arrangements of reverbs and delays to see if you can get a similar effect with fewer nodes

1 Like

Awesome, then that is what I will do. Thanks for getting back to me so quickly, and for helping to provide me a better understanding about the ‘why’ of my issue! :blush:

nice cake! :cake:

2 Likes

It’s crazy when I look at how much I have learned in the past year since joining the community, and looking at how much more there is to climb to the peak of the mountain of knowledge and wisdom! I’ll get there one day :smiley:

2 Likes