In your module constructor when you call configParam()
, you can set a displayBase
, displayMultiplier
, and displayOffset
. These parameters affect the value that’s shown when a user hovers or right-clicks on your parameter and they also are applied inversely to the values that a user enters into the context menu.
So, say your parameter’s range to 0.0
to 1.0
and set displayMultiplier = 20
and displayOffset = -10
. If the parameter’s internal value is 0.5
, the user will right-click and see 0
. If the user then inputs 5
and hits enter, the parameter’s internal value will be set to 0.75.
A catch here for you is that configParam()
can’t be called outside the module’s constructor, so you can’t just call it again when the user changes the parameter’s output range. To get around this, you can either save the pointer to the ParamQuantity
returned by configParam()
so that you can later modify its settings, or you could also subclass ParamQuantity
in order to override its methods like getDisplayValue()
, setDisplayValue()
, etc.