Hi everybody !
I would know if there is an elegant way to use createAndAddParameter outside of the AudioProcessor constructor. The idea is to distribute the creation of parameters in the different modules of a synth (for example, the Envelope 1 adds its parameters, then the Envelope 2, then the LFO 1 etc…).
I’ve tried to createAndAddParameter from the editor but it’s impossible to use this method after having initialized the ValueTree of the AudioProcessorValueTreeState.
So I tried to initialize the ValueTree in the Editor. It failed because the Editor is constructed twice. Consequently I added code to ensure that the ValueTree is initialized once. I then had errors in the beginParameterChangeGesture method.
What I want to avoid is to store a reference of my modules in the processor as they are stored in the editor.
Thanks in advance.