Map plugin parameters through GUI

I’m building a host in JUCE and need to map plugin parameters. I would like to do this by letting the user click controls in the plugin’s AudioProcessorEditor (Ableton Live style).

Is there a way to do this in JUCE?

I have noticed the getControlParameterIndex (Component &) method in the AudioProcessorEditor class which looks promising, but I can’t figure out how to use it.

I have tried handling mouse up events for the plugin’s AudioProcessorEditor to see if that might give me a component reference I could use, but I can’t seem to intercept mouse events for this particular component.

Unfortunately the method getControlParameterIndex() says:

Currently only AAX plugins will call this, and implementing it is optional.

I think the best way is, if you are in learn mode, to intercept all beginGestureChange() messages and link to the first one arriving, switching the learn mode off.

@daniel OK, that should do the trick :slight_smile: I wasn’t aware of the AudioProcessorListener at all.

Be careful with AudioProcessorListener, it seems not to do what it suggests. I got bitten, see this thread:

On the other hand, the AudioProcessorValueTreeState::Listener unfortunately only sends valueChanged(), it would be great if they could send beginGestureChange() and endGestureChange() as well for exactly that purpose.