pantherb / setBfree

DSP tonewheel organ
http://setbfree.org
GNU General Public License v2.0
195 stars 36 forks source link

Permanent CPU usage #73

Open riban-bw opened 4 years ago

riban-bw commented 4 years ago

I use the LV2 plugin on Raspberry Pi 4 (Zynthian) and observe that setBfree utilises approx. 10% CPU permanently, even when idle. Zynthian allows several different sound generation engines to be loaded concurrently. Most have very low CPU usage whilst idle allowing more instruments to be loaded and ready to use than could be used concurrently, e.g. I can have 6 synths loaded all using a few percent of CPU and when I start to use one or two their CPU usage increases but remains within the available resource.

SetBfree always uses 10% so I can have fewer other engines loaded at the same time, even if I am not using setBfree at a particular time. This limits the quantity and type of instruments I can have loaded ready to go. (I know I should be using setBfree for every song but Rachmaninoff may have disagreed).

It would be advantageous if setBfree could reduce its CPU when idle. There may be intentional background noise as part of the emulation in which case an option to mute (gate) or disable this may be a way to implement this feature request.

x42 commented 4 years ago

This is mostly intentional. The DSP load should remain constant regardless of the number of active notes. Otherwise it would be possible to load the plugin without issues but later when you start playing overload the system.

riban-bw commented 4 years ago

I certainly understand the design principle but the scenario I describe shows another use case where minimising load is an advantage. It would be good if it could toggle between full load and no load. (Most other engines work this way, e.g. Pianoteq is very resource hungry when playing notes but falls back to near zero usage when idle, after all sound has decayed to silence.)