I managed to write my plugin and i was happy.
But i realised the vst automation wasn’t automagic.
Okay… i have to use parameters. fine.
I rewrite my code to user parameters, which wasn’t explained in the first bunch of tutorial.
Ok ok, done, i see my parameters in the DAW.
Of course they do nothing but it’s exposed.
I also managed to load & save state. first using Memory because that’s what the tutorial explained, then i rewrote it using XML because that what the tutorial explain a few line later.
all good, all good.
Except that i lost all way of comunicating between UI and processor.
I read more stuff, more code, more tutorial, each with their own way of handling this.
I more or less begin to understand but i can’t implement it.
I read more stuff and i learn about AudioProcessorValueTreeState and that’s the way to do it correctly and it seems i now have to rewrite all my parameters stuff… again.
My frustration knows no bound.
What’s the correct & clean way to expose parameters to both the DAW and the PluginEditor ?
I simply have no idea how to read/write parmeters from the PluginEditor.
On one side i read i should never ever update the UI from the PluginProcessor.
On the other side i read that the PluginProcessor should update the UI when it receive parameter automation (via a timer callback and virgin pixie dust).
How should i update the variable of my audio algorithm from the UI when a slider value is changed ?
The easy way explained in the first tutorial is simply to expose the variable in the header, as a public member, and the job is done.
But i want automation i need to use parameters and hell break loose.
my reference is : https://www.juce.com/doc/tutorial_audio_parameter
It’s not using AudioProcessorValueTreeState and i can’t find tutorial about it but when i search in the forum it’s what is recommended.
Well… i don’t know what to do really. I know it my fault, i’m not the first one trying to write a VST plugin with JUCE and somehow other people made it works. But i’d like to know how