iPlug2 icon indicating copy to clipboard operation
iPlug2 copied to clipboard

DisplayFunc ignored for parameter values displayed in Live from AUv2 plugin

Open pkellett opened this issue 2 years ago • 5 comments
trafficstars

Parameter value display strings provided by a parameter's DisplayFunc are shown in Live for VST2 and VST3 plugins but not AUv2. In AUv2 the displayed value is what you get if the IParam didn't have a DisplayFunc.

To Reproduce Implement a DisplayFunc for a parameter, e.g. GetParam(0)->InitDouble( ... [&](double value, WDL_String& text) { text.Set("Hello?"); });

Expected behaviour Parameter value display text should come from the DisplayFunc, not only on the plugin UI but also in the host (e.g. in Ableton Live where the plugin is inserted press the triangle button to reveal the parameters as sliders with value displays).

IMPORTANT DETAILS

  • What plug-in format does it relate to: AUv2, maybe others but VST2 and VST3 worked ok.
  • What platform does it relate to: macOS
  • What IGRAPHICS_BACKEND does it relate to: N/A

pkellett avatar Apr 06 '23 12:04 pkellett

Can you confirm that this is an issue only for display within the host?

I fear this may be an area where the behaviour can't be guaranteed due to the way that AUv2 works - asfaik it isn't obligated to call the param to string functions because in AUv2 the parameters are stored in value range (as the actual value of the parameter), rather than 0-1 as in the VST spec. The param to string functions do get called for Enums, but not as far as I know at other times.

AlexHarker avatar Apr 06 '23 13:04 AlexHarker

I've checked and the getter for kAudioUnitProperty_ParameterStringFromValue calls through to GetDisplay() on the parameter, so it looks like hosts just aren't calling this at times when you might hope that they would do so..

AlexHarker avatar Apr 06 '23 13:04 AlexHarker

In IPlugAU.cpp if I always set the flag kAudioUnitParameterFlag_ValuesHaveStrings it works as expected and asks for the value string. So I guess that flag should be set if there are NDisplayTexts or if there is a DisplayFunc.

pkellett avatar Apr 11 '23 09:04 pkellett

Thanks - very useful to know - that might also be a route to fixing some scaling stuff in IPlugAU - I will check it out when I have a moment. Can you confirm which hosts you've tested?

AlexHarker avatar Apr 11 '23 14:04 AlexHarker

Tested with AUv2 in Ableton Live 11 and Logic Pro 10.7.4

pkellett avatar Apr 11 '23 16:04 pkellett