Suggestion to implement getParameterLabel in the VST3PluginInstance & fix for juce to steinberg string conversion



I suggest to add “getParameterLabel” in VST3PluginInstance:

String getParameterLabel (int parameterIndex) const override
    return toString (getParameterInfoForIndex (parameterIndex).units);

I have also found an issue when using parameter names or labels that are using non ascii chars ( like a ‘°’ for example) in a vst3 plugin, which ends up as two negative char16 : [0xFFC0 0xFFB0]. The issue is with the toString128(juce::String) function in juce_VST3Common.h

replacing the fromAscii call with a direct conversion of the juce String to utf16 fixes the issue.

inline void toString128 (Steinberg::Vst::String128 result, const juce::String& source)
    //Steinberg::UString (result, 128).fromAscii (source.toUTF8());
    Steinberg::UString (result, 128).assign((Steinberg::char16*)source.toUTF16().getAddress());

I don’t know if fromAscii is supposed to work with utf8 input , if yes then it looks like a bug in the vst3 sdk 3.6.7