|
|
@@ -824,20 +824,17 @@ public: |
|
|
|
|
|
|
|
bool setNormalized (Vst::ParamValue v) override
|
|
|
|
{
|
|
|
|
auto programValue = roundToInt (toPlain (v));
|
|
|
|
const auto programValue = getProgramValueFromNormalised (v);
|
|
|
|
|
|
|
|
if (isPositiveAndBelow (programValue, owner.getNumPrograms()))
|
|
|
|
{
|
|
|
|
if (programValue != owner.getCurrentProgram())
|
|
|
|
owner.setCurrentProgram (programValue);
|
|
|
|
if (programValue != owner.getCurrentProgram())
|
|
|
|
owner.setCurrentProgram (programValue);
|
|
|
|
|
|
|
|
if (valueNormalized != v)
|
|
|
|
{
|
|
|
|
valueNormalized = v;
|
|
|
|
changed();
|
|
|
|
if (valueNormalized != v)
|
|
|
|
{
|
|
|
|
valueNormalized = v;
|
|
|
|
changed();
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
@@ -870,8 +867,13 @@ public: |
|
|
|
return String (CharPointer_UTF16 (reinterpret_cast<const CharPointer_UTF16::CharType*> (text)));
|
|
|
|
}
|
|
|
|
|
|
|
|
Vst::ParamValue toPlain (Vst::ParamValue v) const override { return v * (info.stepCount + 1); }
|
|
|
|
Vst::ParamValue toNormalized (Vst::ParamValue v) const override { return v / (info.stepCount + 1); }
|
|
|
|
Steinberg::int32 getProgramValueFromNormalised (Vst::ParamValue v) const
|
|
|
|
{
|
|
|
|
return jmin (info.stepCount, (Steinberg::int32) (v * (info.stepCount + 1)));
|
|
|
|
}
|
|
|
|
|
|
|
|
Vst::ParamValue toPlain (Vst::ParamValue v) const override { return getProgramValueFromNormalised (v); }
|
|
|
|
Vst::ParamValue toNormalized (Vst::ParamValue v) const override { return v / info.stepCount; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
AudioProcessor& owner;
|
|
|
|