Is it possible to change a parameter's name?

I am making a synth plugin, and i intend to allow it to be run in one of several modes at any given time. If the user changes the mode, then the label and functionality of the controls will change slightly to be relevant to the new mode. Of course, I could just create separate parameters for each mode, but the number of total parameters might be difficult to manage, both for me as a coder, and for an end user trying to use automation. Therefore it makes more sense to simply reuse the existing controls, and temporarily change their names, but I’m not sure how to do that.

Juce don’t have the features but this is doable as long as you don’t change the number of parameters and their range(range changes do not work in some host)

Thanks for the reply. Are you able to be more specific about the way to do this? Do I just delete the AudioParameterFloat object and create a new one with the same pointer? Will that work?


delete ThisParameter;
ThisParameter = new AudioParameterFloat(....);

I’m afraid not as we don’t use Juce plugin framework.
I can just tell you that this is technically doable.

If you just change the name that the parameter returns, and call AudioPluginInstance::refreshParameterList(), that will work, right? (Well, in most hosts - some will obviously fail to update, but there’s not much we could do about that)

I thought that the old way of handling parameters was deprecated? I’ve been creating my parameters like this:

addParameter(Controls::Volume = new AudioParameterFloat("Volume", "Volume", 0, 1, 1));

I assign them to a static variable, so that I can access them from anywhere.
Unless you’re suggesting that I should create a class that inherits from one of your parameter classes so that I override the getName function, I don’t understand what you’re suggesting.

If your parameter variables are static they will be shared between all plugin instance which in almost all cases isn’t desirable.

Isn’t AudioPluginInstance::refreshParameterList() only used in plugin hosts?

I vaguely remember that changing plugin parameter names is possible in AU (there’s some callback to notify the host) and works with Logic but I think it isn’t possible in most other hosts.

OK thanks. I didn’t know that about static parameters. I’ll try to make a few changes. I have no idea how I’ll do it all though. It’s a struggle to share my parameters between all my various classes.
Is this the case for all static variables? Or just static plugin parameters specifically?