Skip to content
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 utilization and dropped note message when sending MIDI CC 11 #96

Open
PetGecko opened this issue Jan 14, 2025 · 9 comments
Open

Comments

@PetGecko
Copy link

Thank you for this wonderful piece of software.

I am using setBfree standalone with JACK, USB audio interface (built in to Numa X Piano 73) on a Raspberry Pi 4B running the latest Raspberry Pi OS. At "idle", setBree's CPU utilization is around 6%. While playing the keys, it may rise to around 12%, with virtually no Xruns. But if I try to use an expression pedal, or knob controller (Korg Nano Kontrol) to send MIDI CC 11, CPU utilization rises to around 24%, I get lots of Xruns (sound breakup), and occasionally even missed "note off" messages (leaving notes hanging after I release the keys. Once I stop moving the expression pedal or knob the CPU utilization settles down and the xruns stop.

Examining the MIDI stream I do not see anything unexpected - just note on and note off messages, and MIDI CC 11 messages when the pedal is moved or the knob is turned.

If I run setBfree inside Ardour on an i5 Windows machine (using the same controller keyboard and USB audio), the problem is less noticeable, although with rapid pedal movement I can hear scratchy sounds (as if I were using an analog volume pedal with a dirty potentiometer).

Any suggestoins other than "ditch the underpowered Raspberry Pi 4B"?

Thanks again.

@x42
Copy link
Collaborator

x42 commented Jan 15, 2025

I cannot explain the high DSP usage, but the swell-pedal volume not smoothed, and can produce zipper-noise.
The signal level "jumps" instantly to the new value. This can be audible as a click..

Fixing this has been on my ToDo list for a few years now, and is currently under my radar... :(

Is it only CC11 that causes high DSP? does the DSP usage recover after a while?

@PetGecko
Copy link
Author

PetGecko commented Jan 15, 2025 via email

@PetGecko
Copy link
Author

PetGecko commented Jan 15, 2025 via email

@x42
Copy link
Collaborator

x42 commented Jan 15, 2025

Thank you. Same issue with MIDI CC 7.

Well that's also mapped to the swellpedal by default. Behavior should be identical to using CC 11.

  • Does DSP load also increase when you use other CCs (not volume control)? e.g. CC 91 reverb or CC 92 vibrato?
  • Does the DSP load recover after a while?

--

PS. The issue with with volume changes causing clicks would get worse if there are fewer steps.
The solution will be to internally ramp the gain to prevent discontinuities.

@PetGecko
Copy link
Author

PetGecko commented Jan 15, 2025 via email

@x42
Copy link
Collaborator

x42 commented Jan 15, 2025

To elaborate..

When you change the volume using CC 7 (or CC 11) from 10 to 20.
Internally setBfree will have to go from 10.00 to 10.01, 10.02 , 10.03 ... tiny smooth steps until the volume reaches 20
(not literally 10 to 20, but the corresponding gain coefficient).

Like an actual volume pedal (or potentiometer) it needs to become a continuous change.

Currently the gain change step-wise every 512 samples which cause audible artifacts when the volume level changes.

Still, it cannot explain increased DSP load, which is more worrisome.

@PetGecko
Copy link
Author

PetGecko commented Jan 15, 2025 via email

@x42
Copy link
Collaborator

x42 commented Jan 18, 2025

and perceived loudness (in dB) is not linear.

Yes, but the pedal on the B3 is linear (back in the 1930s log/exponential amps were the size of a room :)).
In fact, the real B3 swell pedal fades only to a softer sound with less low-end, and does not allow to silence the signal completely.

Now the problem is that this cannot be trivially changed in the plugin without breaking existing sessions that use the plugin.

Have you tried the updated version?

  1. you might get humanly-acceptable "smoothness" with a lot fewer than 100 interpolated values

That was just an example to illustrate the issue of stepwise jumps.

@PetGecko
Copy link
Author

PetGecko commented Jan 18, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants