-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High CPU Usage on large parameter count (Bitwig/VST) #121
Comments
Indeed, it's high. Can you send the files to create the plugin? What do you do with the parameters? Perhaps you use one parameter (or more) for something that is very CPU intensive.
so
Also, instead of using parameters if you don't need the value to be automatable or if you want to save/recall complex values, you can use extra data of the programs. Let me know if it helps. |
I tried on a Mac 10.13 with Reaper 64: the CPU of a VST2 plugin with 128 parameters is around 2% (with the Debug binary, I guess the Release binary is more optimized). So the cause could be the one I explained before - you do something very CPU intensive in your patch with the parameters - or Bitwig doesn't manage well large count of parameters - in this case, you should try with other plugins and perhaps contact them. |
Hi Pierre, Thx for your answer. Actually I really can't seem to find what I'm doing wrong computation-wise. This patch receives CCs, and presents an GUI to control the DSI Evolver (HW synth) and works around a limitation of Bitwig by transforming the CCs and sending them to Pd patch by using netsend/netreceive. The Pd patch then transforms the received values to pure Sysex and out to the midi interface. It works really great, except for this high CPU usage that I don't understand the cause of. I sent the patch to your (g) email adress. Edit: |
I will send you a suggestion for your patch on your email but as it can be interesting other people I try to reply in a generic way here. Perhaps that should even be in the documentation, in a section "How to manage with large number of parameters?". Analyse the patchFirst of all, one good practice is to use a module in Pd that fakes the parameters' changes at each DSP tick. This way, you can more easily see if the patch will be CPU intensive or not. You can use an abstraction as this param.fake.multi patch where the first argument defined the number of parameters: The cause of the problemSo for each parameter you use an abstraction pretty similar to the param.get abstraction given with the examples: This abstraction works for only one parameter but it receive all the parameters' messages and route the right value using the index given the first argument Solution of the problemThis is one solution that should reduce the use of the CPU when a large number of parameter is used. It surely can be even more improved and it's surely not adapted to all approaches and needs but in this particular case it reduced by half the use of the CPU. The idea is to reduce the number of times that the Let me know if it helps and if you suggestion to improve the abstraction. |
In fact, on my machine, it reduces the use of the CPU way more than the half! The patch that you sent me uses around ~13.2% of the CPU and now it's around ~2.2%! |
@pierreguillot that's a brilliant solution! the only thing i don't understand is why you initialized the parameters array with a -999999999999... |
Because it's frequent that the default value is 0. The |
Fixed! |
High CPU Usage on large parameter count (Bitwig/VST).
Environment
Is it expected behaviour ?
The text was updated successfully, but these errors were encountered: