While debugging why no text representations of parameter values appear in the Logic generic parameter view I found out that the reason was that the AU wrapper passes 0 as
maximumStringLength value to that function. In our parameter class we had something like
juce::String valueAsString = ...
return valueAsString.substring (0, maximumStringLength);
which obviously results in an empty string being returned in that case
The documentation does not mention anything about treating 0 as a value to communicate that there is no limitation, it just does not describe the parameter at all:
@see isDiscrete getNumSteps
virtual bool isBoolean() const;
/** Returns a textual version of the supplied normalised parameter value.
The default implementation just returns the floating point value
as a string, but this could do anything you need for a custom type
virtual String getText (float normalisedValue, int /*maximumStringLength*/) const;
/** Should parse a string and return the appropriate value for it. */
virtual float getValueForText (const String& text) const = 0;
/** This can be overridden to tell the host that this parameter operates in the
(Not all plugin formats or hosts will actually use this information).
virtual bool isOrientationInverted() const;
Could you clarify the docs here?