AudioProcessorValueTreeState parameter is not showed as boolean / toggle in Ableton Live 10

I use AudioProcessorValueTreeState and add a parameter like that:

const auto bypassValueToText = [](float value) {
    return value < 0.5f ? "Off" : "On";
  };

  const auto bypassTextToValue = [](const String& text) {
    if (text == "On") { return 1.0f; }
    return 0.0f;
  };

  parameters_.createAndAddParameter(PARAMETERID::kBypassID,
                                    "Bypass",
                                    String(),
                                    NormalisableRange<float>(0.0f, 1.0f, 1.0f),
                                    0.0f,
                                    bypassValueToText,
                                    bypassTextToValue,
                                    false,
                                    true,
                                    true,
                                    AudioProcessorParameter::genericParameter,
                                    true);

I checked this parameter, isDiscrete() and isBoolean() return true and getNumSteps() return 2.
But this parameter still appear as a continus parameter…

Did I do a mistake somewhere or is it a bug with Ableton Live 10?

Unfortunately different hosts handle this in different ways.

To make this work for a VST you should supply your own .vstxml file, but this isn’t well supported.

For an AU you’re likely to get at least a dropdown box in most hosts. In Logic you’ll get a tickbox.

Thank for your insight.
Do you know a place to learn more about vstxml? I’ve never heard about it and it’s not easy to find any information about. I saw you shared a link in a previous topic (http://www.dith.it/listing/vst_stuff/vstsdk2.4/doc/html/vstparamstruct.html) but it seems to be broken…

That was the one good source of info!

I guess that site fell victim to Steinberg’s recent attempt to remove all references to VST2 from the web.

Damn Steinberg!
But do you know in which the boolean setting in parameter works? Because I tried on Adobe Premiere and Reaper too but it’s still the same issue so I guess it’s not in the DAW side

I should have been clearer: if you want it to work in a VST you need a vstxml file and even then a lot of hosts won’t do anything with it (including REAPER).

Why are you guessing it’s not in the DAW side? Have you seen any other plug-ins which show a boolean toggle?

Oh ok, thanks for the clarification.

And yes I saw a lot of plugin doing that. For example here my toggle bypass button automation:

13
46

And here is the boolean automation from an other one:
37
53

I don’t understand why I can automate my bypass parameter with continus values even if Juce tell me that the parameter is discrete.

What is the other plug-in?

@t0m I feel so dumb… I used an Audio Unit instead of a VST, I’ve been fooled by the favoris section of Ableton where all my plugins for test are…
I’m sorry for the inconvenience but indeed only the AU seems to have the ability to show a parameter as boolean.