Why convert 0to1 in AudioParameterInt?

can someone explain me please why there is a convert0to1 function in the AudioParameterInt::getValue() function?

I was wondering why my parameter that goes from 0 to 16000 only outputs 0 or 1…

Parameters are stored (from host perspective) in a range between 0…1 .

Even if modern plugin formats support a wider range this is the standard in juce, also for historical reasons and for compatibility with older plugin formats like VST2.

getValue() is the underlying (private) method which is accessed from the host side.

Use get() or cast the parameter to int, to access the int value.

1 Like