I’m writing a plugin which is supposed to send 2-dimensional panning-information to another computer via OSC.
Therefore I’ve written a 2D-slider GUI class which is basically a rectangle in which you can move around a knob (a surround panner if you want to).
Everything works fine so far as a stand-alone but I’m having difficulties with creating a connection between my 2D-slider and a parameter in my AudioProcessorValueTreeState to be able to use it as a real plugin that saves the parameters and is able to read and write automations in the daw.
Since I don’t use a native JUCE GUI class such as Slider or Button there is no pre-defined Attachment class for my 2D-slider, which I could create inside my PluginEditor.
What would be the most effective way to solve my problem?
I’ve already tried to create a ParameterAttachment object inside my 2D-slider class. But then I don’t know how to connect it to my AudioProcessorValueTreeState as ParameterAttachments seem to only connect to a certain parameter but not to an AudioProcessorValueTreeState.
I’m sure that I’m missing out something obvious.
It’d be great if somebody more experienced could help me!