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

Scrolling through buttons is not consistent #1440

Closed
VincyZed opened this issue Dec 21, 2019 · 5 comments · Fixed by #1441
Closed

Scrolling through buttons is not consistent #1440

VincyZed opened this issue Dec 21, 2019 · 5 comments · Fixed by #1441
Labels
UI Issues related to UI look&feel

Comments

@VincyZed
Copy link
Collaborator

Description:
Scrolling through orange buttons such as Scene Mode, FX Bypass/Character, OSC FM Routing, Filter Configuration, Octave switches, Filter algorithms, Waveshaper Shape, etc. is inconsistent.
Sometimes it takes two scroll steps for it to switch to the next / previous option, when it should only take one.

Version:
Latest nightly, VST3, 64 bits.

Desktop (please complete the following information):

  • Windows 10 x64
  • FL Studio 20.6

Seems like a small bug, probably valid for #1390 ?

@VincyZed VincyZed modified the milestone: 1.6.5 Dec 21, 2019
@baconpaul
Copy link
Collaborator

The mouse wheel tries to normalize the rate based on the number of rows and columns, but I bet that isn’t working quite right.

Code is here

float newVal=value;

It’s a bit hard for me to test this (I don’t have any device with a physical scroll wheel just trackpads with swipe gestures) but here’s some things I would look for

  1. Does getRange() return correct values? (Presumably 0/1)
  2. Is that calculation of rate correct?
  3. You know just generally look at and debug that code branch to make sure normalization is correct!

I’ll look at this when I’m back but since you can now build and do PRs figure I would point you at the code in case you wanted to. It’s a pretty straight forward chunk of code and the solution is definitely in that block somewhere!

@baconpaul baconpaul added this to the 1.6.5 milestone Dec 21, 2019
@baconpaul baconpaul added the UI Issues related to UI look&feel label Dec 21, 2019
@VincyZed
Copy link
Collaborator Author

VincyZed commented Dec 22, 2019

So after some testing, getRange() seems to always return 1.0.
After trial and error, I managed to get it working right by adding +0.13 offset to Range before the calculations. This is clearly not the optimal or final way to do it, but that shows that the issue is indeed somewhere here.

@VincyZed
Copy link
Collaborator Author

Ah I just figured it out. We simply had to do subtract 1 to the number of columns and number of rows because here we want the number of "scroll steps" or "dividers between the buttons" instead of the number of buttons for the calculation!

@baconpaul
Copy link
Collaborator

Oh yeah!

@baconpaul
Copy link
Collaborator

If you put that in a pr I can merge it in the morning! Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI Issues related to UI look&feel
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants