Yes, I’ve tested both the old and new versions side-by-side in exactly the same host. Once switched back to 6.0.7, getName() gets called consistently, while switching to 6.0.8, it only gets called on parameter initializations and never got called after. And I did the test on 2 different Macs, got the same result. That’s why I reckon there must be some changes in the new version that causes the change of behavior.
The reason why I need that to work is that my plugin is a modular synth, user can add/remove modules at any time, each module has different parameters, so every time a module is added or removed, the plugin needs to rename the parameters properly so that the host reflects the name changes.
The way it works right now is:
Creating my own subclass of AudioParameterFloat, adding a String member variable, and overriding the getName function to return the stored name.
Initializing enough amount of parameters in the constructor of my AudioProcessor, with their names set to empty strings, so the host wouldn’t display them in the automation menus.
When a new module is added, updating the name stored in my subclass of AudioParameterFloat, followed by a setValueNotifyingHost.
The host is now aware of the change so the parameters in the automation menu get updated.
This is how I created the parameters.
for (int i=0; i < MAX_NUM_PARAMS; ++i)
layout.add(std::make_unique<SBAudioParameterFloat>(String(i), "", NormalisableRange<float> (0.f, 1.f), 0.f));
layout.add(std::make_unique<SBAudioParameterFloat>("master_bypass", "master_bypass", 0.f, 1.f, 0.f));
And the name update:
//parent is my AudioProcessor
SBAudioParameterFloat* target = static_cast<SBAudioParameterFloat*>(parent.getParameters()[i]);
// displayName is the member String variable in my custom subclass to store the name
target->displayName = vt.getType().toString() + " - " + param.getType().toString();
// other configurations
Not sure if it’s related, but I’ve been using APVTS to manage the parameters.
Hope this explains the issue and what I’m trying to achieve, please advise, thanks.