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

Knob parameter value graphic (green circle) shows even when value is 0 #5747

Closed
sound8 opened this issue Oct 29, 2020 · 7 comments · Fixed by #5850
Closed

Knob parameter value graphic (green circle) shows even when value is 0 #5747

sound8 opened this issue Oct 29, 2020 · 7 comments · Fixed by #5850

Comments

@sound8
Copy link

sound8 commented Oct 29, 2020

Edit: @tresf / @Spekular added screenshot of issue

Bug Summary

Each knob has a green circle graphic indicating the value of the parameter which is greyed out when the value is at 0.
In certain situations the knob graphic can show a little green piece on the left side in the beginning of this circle even though the value is 0.

Steps to reproduce

The easiest way to reproduce this is if you click your mouse on the knob and instead of dragging straight up or down to change the parameter like you normally would, drag your mouse pretty far out to the left and then slowly down.
You will see the value of the knob is going down (decreasing) and if done successfully you will replicate this issue.
I have experienced this in other ways, but I think this is the best way to generate an example of this issue.

Expected behavior

Graphic knob indicator is supposed to be greyed out when value is 0

Actual behavior

At times graphic knob indicator can show a little value graphically even though the actual parameter value is at 0

Not a big deal because only really happens when using the knob improperly, but if easy to fix may be worth.

Affected LMMS versions

1.2.2

@sound8 sound8 added the bug label Oct 29, 2020
@zonkmachine
Copy link
Member

Graphic knob indicator is supposed to be greyed out when value is 0

Can you give a more specific example? The knob/button is greyed out when the it is disabled (for whatever reason). You could have a setting that only applies to some of the other settings and not all and then disable/grey out the gui part that doesn't apply or maybe hide it altogether.

Is this the issue you're referring to ?#4749

@sound8
Copy link
Author

sound8 commented Oct 29, 2020

@zonkmachine
Again not a big deal
No that is not the issue I am referring to, and it is not a setting either.
This occurs with all LMMS knobs that show that green graphical indicator of how much of parameter is knob is turned to.
When any knobs value is 0 for example volume knob, if volume is set to 0 then that green indicator around the knob is grey.
When you increase volume knob to 50% then the green indicator lights up showing the knob parameter has value.
If you try the method I mention of generating the issue, what will happen is from our example above
Volume knob value will be 0 yet you will see the green indicator lit up just a little piece as if the Volume knob had a value of 5%.

I have experienced this here and there but the only way I can replicate it is by as mentioned
instead of dragging mouse straight up and down, hold down you mouse button and drag mouse far out to the left and then slowly drag down like you are mimicing the shape of a high pass filter curve :)
like open up a triple osc and place the window at the right side of your screen and then try it out with its volume knob
volume knob default is half way, try lowering it to 0
while holding left mouse button slide your mouse cursor almost all the way to the left side of your screen drawing that high pass filter curve shape down slowly
you will notice the knobs value decreasing and if done correctly the green indicator will still show a little piece in the beginning of it even thought the knobs actual value is 0.
may have to do it a couple times, sometimes you can generate it by dragging down at a 45 degree angle down and to the left

Hopefully this makes sense, if not let me know and I will see if I can help
Thank you for your response

@zonkmachine
Copy link
Member

OK. I see what you mean now. Sometimes you turn the the knob to 0 and the indicator isn't completely dimmed.

@Spekular
Copy link
Member

A picture is worth a thousand words, so here's a screencap of the issue. Both knobs are zero, but the ring around the top knob still has a tiny segment highlighted, making it seem as if it's not set to 0. However, the context menu item "Copy value (0%)" proves that it is.
image

@DomClark
Copy link
Member

Knob::updateAngle only updates the angle if it has changed more than three degrees since it was last painted:

if( qAbs( angle - m_angle ) > 3 )
{
m_angle = angle;
return true;
}
return false;

Presumably this is some optimisation intended to reduce repainting, but unless it has a noticable effect on performance, perhaps it should be removed to avoid visual errors like this.

@Spekular
Copy link
Member

In the (unlikely, I'd guess) case that this does cause issues, we can probably just add || angle == 0, right?

@zonkmachine
Copy link
Member

we can probably just add || angle == 0

A one-liner. I think you should pull that. I don't know how much the performance gains are but it's pretty clear what the code does.

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

Successfully merging a pull request may close this issue.

4 participants