This project has moved and is read-only. For the latest updates, please go here.

Force VstParameterManager values to integer

Topics: Newbie, Plugin Development
Jul 4, 2013 at 9:55 AM

I'm stuck on issue, that I want the VstParameterrManager values to be only in integer. I set all VstParameterInfo just integer values like this:
VstParameterInfo paramInfo = new VstParameterInfo
                                                 Category = paramCategory,
                                                 CanBeAutomated = true,
                                                 Name = "PDPwr",
                                                 MinInteger = 0,
                                                 MaxInteger = 1,
                                                 StepInteger = 1,
                                                 LargeStepInteger = 1,
                                                 DefaultValue = 1
but I can't find any property to force it to be integer only. As sequencer I use Ableton Live 8.2 and the slider moves in floating point values. Is there any way to do it? Not even the IsSwitch property doesn't help.

Thank you
Jul 5, 2013 at 6:26 AM

Sorry it took some time for me to answer.

The VstParameterInfo is communicated when to the host when it call a specific method. Not all hosts call that method so VST.NET has the option to apply a mapping that will translate the 0.0-1.0 value range to whatever you've specified in the parameter info.

Did you call VstParameterNormalizationInfo.AttachTo(paramInfo) ??

That will install the mapping. When the Hosts calls into the plugin to retrieve these parameter-properties that mapping is automatically removed.

Hope it helps.