Mousewheel messages and IMouseObserver

A user interface toolkit mainly for audio plug-ins (VST, AudioUnit, etc).
ray
Posts: 86
Joined: Fri Sep 02, 2016 9:37 am

Mousewheel messages and IMouseObserver

Postby ray » Wed Nov 14, 2018 11:11 am

Hi,

I'm currently trying to come up with a bugfix in which I have to work around interferences between direct UI updates triggered by mousewheel interactions on the one hand and parameter updates imposed on the component by the AAXWrapper scheduled update logic that forces parameter updates into the main thread idle. The latter ones are subsequently transferred back to the UI via IEditController::setParameterNormalized() and cause the described interference.

In order to fix this, I would like to detect and signal mousewheel events globally and without overriding any specific onWheel() control implementations.

However, currently it seems there is no way to do so, because IMouseObserver does not allow for intercerpting mousewheel messages at all - is this by design? What would you suggest? IPlugView::onWheel() never gets hit, either.

Thanks.

Best,
Ray

Arne Scheffler
Posts: 216
Joined: Mon Jun 20, 2016 7:53 am

Re: Mousewheel messages and IMouseObserver

Postby Arne Scheffler » Fri Nov 16, 2018 6:16 pm

Hi Ray,
at the moment there's no way to disable mouse wheel functionality.
But don't you get the same issue when someone uses mouse down and mouse move to change control value ?

Your best bet for a hot fix is to patch CFrame and intercept platformOnMouseWheel.

Cheers,
Arne

ray
Posts: 86
Joined: Fri Sep 02, 2016 9:37 am

Re: Mousewheel messages and IMouseObserver

Postby ray » Sat Nov 17, 2018 12:01 am

Arne Scheffler wrote:Hi Ray,
at the moment there's no way to disable mouse wheel functionality.
But don't you get the same issue when someone uses mouse down and mouse move to change control value ?

Your best bet for a hot fix is to patch CFrame and intercept platformOnMouseWheel.

Cheers,
Arne


Hi Arne,

I’m not trying to disable the mouse wheel but I’m trying to detect (in a global manner) when the user interacts with my GUI through the mouse wheel.

Normal drag edits don’t cause this type of behavior because they are always framed by beginEdit()/endEdit() so I can simply check ongoing edits using the isEditing() state in my EditController::setParamNormalized() implementation.

With mousewheel edits, as you know, it’s a series of beginEdit() / valueChanged() / endEdit() ..so in terms of the editing state it’s not a continuous thing which may be interrupted, in this case by the AAXWrapper‘s scheduled parameter updates sent back to my component. I haven’t tried yet, but I assume the same issue can be reproduced with the AAX wrapped SDK example. Will check ASAP.

My idea to work around this would be to have a hold timer that keeps an „isInWheelEdit“ state for a couple of milliseconds after a mouse wheel edit ended so the AAX wrapper’s next idle interval has expired. This is why I need to detect wheel events globally.

A workaround could be to keep track of *drag* movements using an appropriate IMouseObserver implementation, because anything else is either a wheel or a key edit, but that would fail when the user clicks and then starts turning the mousewheel without moving the cursor.

Hope that makes sense.

Best,
Ray
Last edited by ray on Sun Nov 18, 2018 7:55 am, edited 4 times in total.

ray
Posts: 86
Joined: Fri Sep 02, 2016 9:37 am

Re: Mousewheel messages and IMouseObserver

Postby ray » Mon Nov 19, 2018 11:00 am

I can confirm that the reported issue is reproducible using the AAX wrapped AGain SDK example. Simply move the gain fader using the mousewheel and you'll see the described glitches. They get more apparent when you hold down the shift modifier for fine movement. Instead of moving smoothly like in other formats, the slider will occasionally jump around when the wrapper interferes with a scheduled UI thread idle paramter update holding one of the previous values during the ongoing edit.

Best,
Ray

Arne Scheffler
Posts: 216
Joined: Mon Jun 20, 2016 7:53 am

Re: Mousewheel messages and IMouseObserver

Postby Arne Scheffler » Mon Nov 26, 2018 4:25 pm

Hi,
would it help to add an onWheel method to the IMouseObserver interface ?
Then I think it would be easy to add.

Cheers,
Arne

ray
Posts: 86
Joined: Fri Sep 02, 2016 9:37 am

Re: Mousewheel messages and IMouseObserver

Postby ray » Mon Nov 26, 2018 5:18 pm

Arne Scheffler wrote:Hi,
would it help to add an onWheel method to the IMouseObserver interface ?
Then I think it would be easy to add.

Cheers,
Arne


Hi Arne,

yes, I think that would be a good addition because it would give developers a chance to work around this or observe the mouse wheel action for other purposes.

Best,
Ray


Return to “VSTGUI”

Who is online

Users browsing this forum: No registered users and 1 guest