stoermelder / vcvrack-packone

Modules for VCV Rack
GNU General Public License v3.0
175 stars 40 forks source link

SPIN - Normal Scrolls Suddenly Become Parameter Scrolls When Passing Over a Control #260

Closed ghost closed 3 years ago

ghost commented 3 years ago

The view can be scrolled (and panned if using a trackpad) by starting a scroll with the pointer not over a control. However if the scroll causes a control to pass under the pointer, the parameter starts being adjusted, and the view stops being scrolled. This makes normal scrolling difficult. Would it be possible to detect when a scroll really started over a parameter and unless this is true, suppress parameter adjustment until this scrolling action has ended?

stoermelder commented 3 years ago

I don't think I can find a reliable condition for that. Wouldn't it be easier to use one of the modifier keys for mouse wheel adjustments?

ghost commented 3 years ago

I could add a modifier key but then it would be necessary to press or release the key to switch between adjusting parameters or scrolling. It would be great not to have to interact with the keyboard at all when moving around a large setup tweaking parameters. Could it be implemented using an interval timer (say 5ms): If a scroll event is received when not over a control, then start the timer and do a normal scroll. If a scroll event is received when over a control and the timer is running, it must have started when not on a control so do a normal scroll. If a scroll event is detected when over a control and the timer is not running, then adjust the parameter and don't start the timer. However I'm not sure if a plugin can do this.

stoermelder commented 3 years ago

5ms is far too short. The minimum evaluation period possible depends on the screen rate, which would be about 16ms at 60Hz. Sill, this far too short. I found 350ms working ok.

stoermelder commented 3 years ago

@chrisgr88 any feedback on this?

ghost commented 3 years ago

It sounds great. How can I try it?

stoermelder commented 3 years ago

The development build can be downloaded here: https://github.com/stoermelder/vcvrack-packone/releases/tag/Nightly

ghost commented 3 years ago

I'm not sure it's working quite as expected. With no modifier keys selected in Spin I can scroll to adjust controls with no modifier keys held down. But I can't do a normal scroll by starting with the pointer not on a control. I attached an image of my settings and connections to Sail. I'm testing with the trackpad on a Macbook Pro M1. The plugin version is v1.8.605372d.

Screen Shot 2021-06-01 at 7 35 39 AM
ghost commented 3 years ago

Ah, I just found the problem. I should have had the switch set to only be active when hovering over a parameter. Now it seems to be working correctly. Very cool! I'll test further and let you know if I find any issues.

ghost commented 3 years ago

Minor issue: It can switch into parameter adjusting mode if you scroll over a control very slowly. Possibly setting the delay to even longer than 350 ms could work. It would probably be acceptable to wait for up to a second before adjusting a parameter after stopping scrolling. It would be better than accidentally adjusting a parameter while scrolling slowly.

stoermelder commented 3 years ago

Well, there will always be some threshold, so it needs to be a compromise. I suspect the next person will say "I need to way soo long before before my mouse-wheel works on a parameter". I increased it to 500ms and I think this is good enough.

ghost commented 3 years ago

That should be fine. Thanks for adding this feature, and for all your very impressive plugins!

stoermelder commented 3 years ago

Thanks!