-
Notifications
You must be signed in to change notification settings - Fork 37
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
Comments
I cannot explain the high DSP usage, but the swell-pedal volume not smoothed, and can produce zipper-noise. 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? |
Thank you. Same issue with MIDI CC 7.
I understand that fundamentally the volume changes will be quantized
(stepped) due to only have 128 possible values, but at least to my ear this
is not a problem if there is no other extraneous sound (my TV only goes to
40!).
But your answer is helpful because I know it can be made tolerable with a
better CPU.(which makes other things possible too); the only question is
"how much better" which I know you can't answer.
…On Tue, Jan 14, 2025, 20:37 Robin Gareus ***@***.***> wrote:
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?
—
Reply to this email directly, view it on GitHub
<#96 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP76X4HEBXLUSCPZSLNCA6L2KW3XHAVCNFSM6AAAAABVGAOYGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJRGQ2TGNJXGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
PS maybe we can redefine the problem to solvable one: allow control of
volume to be MORE quantized (like a drawbar). No, it isn't an "accurate"
modeling of a B3, but it should eliminate the audible artifacts.
I don't care so much about being able to make tiny incremental changes in
volume. I don't need 128 steps. I just need to be able to make it
"louder" (when it's "too loud") or "softer" (when it's "too loud") in the
setting of a live band performance - but be able to do so my feet, not my
hands.
So let's say that 8 discrete steps is musically sufficient (though maybe
the correct answer is 16 steps, or 32 steps).
Instead of using an expression pedal which only knows how to send out 0
through 127, I can program a button on my MIDI Baby 3 pedal to increase
(with a short tap) or decrease (with a longer press) the value of MIDI CC 7
(or 11) by an arbitrary number of units (e.g. 16). Now setBfree will only
ever see one of 8 possible values for this CC (i.e. 0, 15, 31, ... 127).
…On Wed, Jan 15, 2025 at 3:34 AM Pete Greco ***@***.***> wrote:
Thank you. Same issue with MIDI CC 7.
I understand that fundamentally the volume changes will be quantized
(stepped) due to only have 128 possible values, but at least to my ear this
is not a problem if there is no other extraneous sound (my TV only goes to
40!).
But your answer is helpful because I know it can be made tolerable with a
better CPU.(which makes other things possible too); the only question is
"how much better" which I know you can't answer.
On Tue, Jan 14, 2025, 20:37 Robin Gareus ***@***.***> wrote:
> 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?
>
> —
> Reply to this email directly, view it on GitHub
> <#96 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AP76X4HEBXLUSCPZSLNCA6L2KW3XHAVCNFSM6AAAAABVGAOYGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJRGQ2TGNJXGI>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Well that's also mapped to the swellpedal by default. Behavior should be identical to using CC 11.
-- PS. The issue with with volume changes causing clicks would get worse if there are fewer steps. |
Sending CC 91 reverb increases DSP utilization very similarly to sending CC
7 or 11.
However:
1. CC 91 does NOT cause the sound to break up, and does not cause hanging
notes (presumably from missed "note off" messages).
2. In the GUI the reverb knob moves very with CC 91, whereas the volume
knob is often very jumpy with CC 7 or 11 at times (seeming to correspond to
when the sound gets static-y).
So the sound breaking up with CC 7 or 11 seems to be independent of the
increase in DSP utilization.
…On Wed, Jan 15, 2025, 08:02 Robin Gareus ***@***.***> wrote:
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.
—
Reply to this email directly, view it on GitHub
<#96 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP76X4GU3NFJLCIPTHH6KAL2KZL7HAVCNFSM6AAAAABVGAOYGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJSHAYDENJTGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
To elaborate.. When you change the volume using CC 7 (or CC 11) from 10 to 20. 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. |
I defer to your MIDI expertise, and your setBfree expertise in particular;
and I may misunderstand the purpose of the interpolation.
The relationship between the volume setting (as determined by MIDI CC 7)
and perceived loudness (in dB) is not linear.
This is obvious when slowly sweeping the volume pedal from 0 to 127:
- it is hard to make the volume changes "smooth" when near the bottom (0)
- it takes more movement to hear a change near the top (127).
Others have quoted one of the MIDI specifications as stating that dB =
40*log10(n/127), where n=the MIDI CC 7 value)
There is disagreement about minimum change in loudness that a human can
perceive (it may depend on the human). Let's say it is somewhere between
0.25 dB and 1 dB - but the exact value doesn't matter.
Changing MIDI CC 7 from 1 to 2 will increase the loudness by over 12 dB
(from -84.15 to -72.11) - everyone who can hear will perceive that.
But changing MIDI CC 7 from 126 to 127 will increase the loudness by barely
1/100th of this amount (from -0.137 to 0) - probably most people won't
perceive that.
If this is even roughly correct, then:
1. you might get humanly-acceptable "smoothness" with a lot fewer than 100
interpolated values between integer values for MIDI CC 7 (or 11).
2. the necessary # of interpolations for "smoothness" will decrease as MIDI
CC 7 increases.
3. above a certain threshold, no interpolation will be needed, because it
will be imperceptible. If 0.25 dB is the minimum detectable difference,
then once you get to MIDI CC 7 = 69, each additional increase (e.g. from 69
to 70) will result in less than a 0.25 dB increase (thus imperceptible).
If 69 to 70 is at the edge of being perceptile, what is the value of 69.01,
69.02, ... 69.99
[image: image.png]
…On Wed, Jan 15, 2025 at 8:46 AM Robin Gareus ***@***.***> wrote:
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.
—
Reply to this email directly, view it on GitHub
<#96 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP76X4DKICMXZNG4D77XCDT2KZRCDAVCNFSM6AAAAABVGAOYGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJSHA4TSMZTGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Yes, but the pedal on the B3 is linear (back in the 1930s log/exponential amps were the size of a room :)). 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?
That was just an example to illustrate the issue of stepwise jumps. |
Thank you!
Yes the new LV2 (tested in Carla) fixed the problem! It sounds good, DSP
usage stays low, and the volume knob in the GUI is not jumpy.
The standalone still reports as 8.11 and exhibits, but I will just use the
plugin.
My piano teacher in the 1960s and 70s was also a professional organist and
had a B3 and Leslie in his tiny studio, in the corner next to the piano. We
would often jam together on the popular tunes I was learning. As a kid I
didn't know anything about Hammond or Leslie, except that I loved that
sound. Thanks for making it accessible again.
…On Fri, Jan 17, 2025, 20:58 Robin Gareus ***@***.***> wrote:
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.
—
Reply to this email directly, view it on GitHub
<#96 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP76X4CRHUJ52N7QLERLDDT2LGYMFAVCNFSM6AAAAABVGAOYGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJZGQ3DOMJSGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
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.
The text was updated successfully, but these errors were encountered: