Sorry for bringing this up once again but none of the topics my searches returned explained the topic to an end and I’m looking for an answer here to base a potential new JUCE project on.
I’m thinking about developing a sampler that can load different multisample instruments.
Now if an instrument A has 3 parameters
and an instrument B has 2
is there a way to change the AudioProcessor’s parameter array when instrument A is loaded and I then load instrument B? I can see methods of adding parameters but not for removing from or clearing the array.
Looking at the documentation of the AudioProcessor class seeing the function
refreshParameterList() and especially the explaining sentences
A processor should implement this method so that the host can ask it to rebuild its parameter tree. If a plugin never changes its parameters, it's enough to create its parameters in its constructor and do nothing in this method, but some may want to
and also the function
updateHostDisplay() gave me some hope.
Can I change the number of parameters, their names, ranges and resolution while the sampler plugin is instantiated i.e. at runtime? Maybe if I don’t support legacy VST2 but only VST3, AU and AAX (Mac & Win)? If so, what is best practice to do so? What is the alternative? Exposing a fixed number of meta parameters with generic names and map them to actually existing params? Is there a nicer alternative by now?
setParameterTree()… Is that what I should use? If yes - does it work in all major hosts?