Quote:
Originally Posted by Nonlinear
Still no explanation of why Bool/Int types don't work right. VST2 seems to make all parameters Double type with continuous vs. discrete values.
|
It's probably because effGetParameterProperties isn't implemented. To fix this you could do something like this:
Code:
case effGetParameterProperties:
{
if (ptr && idx >= 0 && idx < _this->NParams())
{
VstParameterProperties* pp = (VstParameterProperties*) ptr;
IParam* pParam = _this->GetParam(idx);
strcpy(pp->label, pParam->GetNameForHost());
switch (pParam->Type())
{
case IParam::kTypeBool:
{
pp->flags = kVstParameterIsSwitch;
break;
}
// case IParam::kTypeInt:
case IParam::kTypeEnum:
{
pp->flags = kVstParameterUsesIntegerMinMax | kVstParameterUsesIntStep;
pp->minInteger = (int) pParam->GetMin();
pp->maxInteger = (int) pParam->GetMax();
pp->largeStepInteger = pp->stepInteger = 1;
break;
}
}
return 1;
}
return 0;
}
Note that you could do the same for kTypeInt as for kTypeEnum, but IMHO int automation is better off being treated like float. Also note that changing this *might* mess up existing automation, depending on the host.