isPerformingGesture as real feature

Can we please have isPerformingGesture as actual feature, not just as debbuging help?

In my GUI engine PluginGuiMagic I implement a RadioButtonManager, that acts parallel to a ParameterAttachment.

The ParameterAttachment will update the button, which will react with setToggleState. This triggers a sendClickedMessage (maybe here is the actual mistake), which will propagate into my RadioGroupManager. But now there is already a gesture happening.

I would be able to simply ignore button clicks when a gesture is in progress. I think it is a common scenario that you don’t want to send parameter changes, if a control is currently performing a gesture.

TL;DR:
can we please get a method exposing that flag:

bool AudioProcessorParameter::isPerformingGesture() const;

Thanks for your consideration

2 Likes

that’s one of these moments that shows why i made my own parameter subclass, cause then you can just put such a flag into setValue. i needed this flag for midi learn, cause otherwise the gui could attempt to drag a knob while a midi cc event also tries to modulate its parameter

There is a sweet spot of rolling your own and using the features of the framework.

Also the GUI engine will hook onto arbitrary juce projects. Your approach would mean I have to force my users to use my bespoke parameters.

At that point I might as well start my own audio framework, which is rather pointless. I wouldn’t be able to do anything else and it is not said I would get anywhere near JUCEs feature set.

But thanks for your post, it shows I am not the only one who needs that flag.

true. i only dropped my comment to show the team that you’re not the only one struggling with a missing flag in there

1 Like

Any official feedback? Just met another user on discord with the same problem.

I definitely want that feature and had to create all kinds of workaround to be able to store and access that state.

while we’re here, I think it would be great if begin/end change gesture would have the option to just internally save their state and not call the host, say if it’s a private parameter the host doesn’t know about. ATM it asserts if you do that.

2 Likes

Just moved this to Feature Requests, please cast your votes!

1 Like

thanks for connecting this!
Merging sources of gesture are kind of a pita till now, and this solution is simple and clean.

please, please, please, please!!!

2 Likes

Bumping too, would be a great feature to have that I keep working around by using a listener to the parameter or the processor.

One possible implementation would be to make beginChangeGesture virtual so I could at least in my parameters implement it like this:

MyParameter::beginChangeGesture()
{
    duringGesture = true;

    //Optional: use the base class implementation:
    AudioProcessorParameter::beginChangeGesture();
}

That would allow creating templates in user code that wraps parameters, for example:

PrivateParam<AudioParameterBool>;

Which makes sure a touch/release gesture isn’t asserting when no processor is around, yet can be passed into existing ParameterAttachments and other reusable GUI objects that expect a parameter.

1 Like

I’ve just been running up against this need to keep track of the ‘gesture state’ and saw this thread. I got the impression that callbacks related to parameter gestures could happen on any thread, so any reliable ‘gesture state’ would have to be implemeted using an atomic, right? What kind of tradeoffs would that entail?

1 Like