Assertion failure in AU_Wrapper


#1

Hi guys,

I have some sliders set to different ranges (i.e: 20..20000), but when I add the parameter to the PluginProcessor and I set a default value greater than 1.0f the plugin crashes with an assertion failure on juce_AU_Wrapper, on outParameterInfo.

Nothing trivial on the parameter declaration.. the usual addParameter args. Example:

 addParameter (cutoff = new FloatParameter (1000.0f, "Cutoff"));

Anybody experiencing the same issue?


#2

Well, yes, the valid range of an AudioProcessorParameter's value is between 0.0f and 1.0f. Your getValue() and getDefaultValue() methods must always return numbers within that range.


#3

Thank you, Timur. I see that the parameter given by a Slider, for example, with a range defined by setRange is automatically converted to 0-1 while passing it to the AudioProcessorParameter. I was expecting it to work both ways. In this case, which is the best way to send a value back to the Slider?

 

Thanks