AudioProcessorParameter and Automation


With the new audioProcessorParameter, how do I handle automation?  I've been trying to work off of the sample but nothing changes in the host (Abelton). So For example how to I parse values to be displayed on the automation controls? The documentation is a little sparse.


class FloatParameter : public AudioProcessorParameter
    FloatParameter (float defaultParameterValue, const String& paramName, const String& unitName)
    : defaultValue (defaultParameterValue),
    value (defaultParameterValue),
    name (paramName),
    float getValue() const override
        return value;
    void setValue (float newValue) override
        value = newValue;

    float getDefaultValue() const override
        return defaultValue;
    String getName (int maximumStringLength) const override
        return name;
    String getLabel() const override
        return units;
    float getValueForText (const String& text) const override
        return 0.0f;//text.getFloatValue();
    String getText     (     float      value, int ){
        return "test?";
    int getNumSteps() const{
        return 2;
    float defaultValue, value;
    String name, units;


Also in that example I was trying to make there be only 2 discrete steps, but it appears to make no difference in the automation window.


Whether the host takes any notice of the number of steps depends on the host + plugin format. It's not used everywhere.


Your code's a bit sketchy, but returning a string from getText is the right thing to do if you want to provide a string.


Hey sorry I didn't explain well. I assumed getText was supposed to parse the value to display on the host screen. So For example, I have 3 radio boxes and I want the user to choose between those 3. I wanted to set getNumSteps to 3, then have getText return something like "ButtonA", "Button B", "Button C". I tried playing with all of the return values but they seemed to have no effect, and the host still displays 0-1 as usual.


Well some hosts may not even bother calling the function to get the text, and may just show the number.. Again, it depends on the host.


So just put in the desired code anyway and it will automatically fall back to 0-1 if the host doesn't support it correct?