How to use `AudioProcessorParameter::getLabel()`?

Hello,

unfortunately in my plugin the method AudioProcessorParameter::getLabel() is never called. I tried to automate parameters in DAW, changing it from my sliders, and by editing slider text box, but it is never called (at least on MacOS in Reaper with plugin format AU).

Actually my sliders and automated params in DAWs works well and display appropriate values and units. But I’ve just discovered that method and in JUCE documetation there is comment as follows:

Some parameters may be able to return a label string for their units. For example “Hz” or "%

So it looks like it has something to do with parameters units. This intrigued me so I tried to make some tests.

Could any one help me to use that method?

For any help great thanks in advance.

In my understanding it is a virtual function, which we can override based on our requirement and parameter.

For example, if the parameter is a level, we can override the above function to return ‘dB’.

The label is provided in the constructor, using an attributes struct.

getLabel retrieves the value passed in on construction. You can use this workflow and skip the string from value function. If you have working stringfromvalue and valuefromstring functions in place, you don’t need to worry about it.