|
|
@@ -1700,20 +1700,10 @@ struct VST3PluginInstance : public AudioPluginInstance |
|
|
{
|
|
|
{
|
|
|
VST3Parameter (VST3PluginInstance& parent,
|
|
|
VST3Parameter (VST3PluginInstance& parent,
|
|
|
Steinberg::Vst::ParamID parameterID,
|
|
|
Steinberg::Vst::ParamID parameterID,
|
|
|
const String& parameterName,
|
|
|
|
|
|
const String& parameterLabel,
|
|
|
|
|
|
Steinberg::Vst::ParamValue defaultParameterValue,
|
|
|
|
|
|
bool parameterIsAutomatable,
|
|
|
|
|
|
bool parameterIsDiscrete,
|
|
|
|
|
|
int numParameterSteps)
|
|
|
|
|
|
|
|
|
bool parameterIsAutomatable)
|
|
|
: pluginInstance (parent),
|
|
|
: pluginInstance (parent),
|
|
|
paramID (parameterID),
|
|
|
paramID (parameterID),
|
|
|
name (parameterName),
|
|
|
|
|
|
label (parameterLabel),
|
|
|
|
|
|
defaultValue (defaultParameterValue),
|
|
|
|
|
|
automatable (parameterIsAutomatable),
|
|
|
|
|
|
discrete (parameterIsDiscrete),
|
|
|
|
|
|
numSteps (numParameterSteps)
|
|
|
|
|
|
|
|
|
automatable (parameterIsAutomatable)
|
|
|
{
|
|
|
{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1767,17 +1757,17 @@ struct VST3PluginInstance : public AudioPluginInstance |
|
|
|
|
|
|
|
|
float getDefaultValue() const override
|
|
|
float getDefaultValue() const override
|
|
|
{
|
|
|
{
|
|
|
return (float) defaultValue;
|
|
|
|
|
|
|
|
|
return (float) pluginInstance.getParameterInfoForIndex (getParameterIndex()).defaultNormalizedValue;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
String getName (int /*maximumStringLength*/) const override
|
|
|
String getName (int /*maximumStringLength*/) const override
|
|
|
{
|
|
|
{
|
|
|
return name;
|
|
|
|
|
|
|
|
|
return toString (pluginInstance.getParameterInfoForIndex (getParameterIndex()).title);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
String getLabel() const override
|
|
|
String getLabel() const override
|
|
|
{
|
|
|
{
|
|
|
return label;
|
|
|
|
|
|
|
|
|
return toString (pluginInstance.getParameterInfoForIndex (getParameterIndex()).units);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
bool isAutomatable() const override
|
|
|
bool isAutomatable() const override
|
|
|
@@ -1787,12 +1777,14 @@ struct VST3PluginInstance : public AudioPluginInstance |
|
|
|
|
|
|
|
|
bool isDiscrete() const override
|
|
|
bool isDiscrete() const override
|
|
|
{
|
|
|
{
|
|
|
return discrete;
|
|
|
|
|
|
|
|
|
return getNumSteps() != AudioProcessor::getDefaultNumParameterSteps();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
int getNumSteps() const override
|
|
|
int getNumSteps() const override
|
|
|
{
|
|
|
{
|
|
|
return numSteps;
|
|
|
|
|
|
|
|
|
auto stepCount = pluginInstance.getParameterInfoForIndex (getParameterIndex()).stepCount;
|
|
|
|
|
|
return stepCount == 0 ? AudioProcessor::getDefaultNumParameterSteps()
|
|
|
|
|
|
: stepCount + 1;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
StringArray getAllValueStrings() const override
|
|
|
StringArray getAllValueStrings() const override
|
|
|
@@ -1802,10 +1794,7 @@ struct VST3PluginInstance : public AudioPluginInstance |
|
|
|
|
|
|
|
|
VST3PluginInstance& pluginInstance;
|
|
|
VST3PluginInstance& pluginInstance;
|
|
|
const Steinberg::Vst::ParamID paramID;
|
|
|
const Steinberg::Vst::ParamID paramID;
|
|
|
const String name, label;
|
|
|
|
|
|
const Steinberg::Vst::ParamValue defaultValue;
|
|
|
|
|
|
const bool automatable, discrete;
|
|
|
|
|
|
const int numSteps;
|
|
|
|
|
|
|
|
|
const bool automatable;
|
|
|
};
|
|
|
};
|
|
|
|
|
|
|
|
|
VST3PluginInstance (VST3ComponentHolder* componentHolder)
|
|
|
VST3PluginInstance (VST3ComponentHolder* componentHolder)
|
|
|
@@ -1878,21 +1867,10 @@ struct VST3PluginInstance : public AudioPluginInstance |
|
|
|
|
|
|
|
|
for (int i = 0; i < editController->getParameterCount(); ++i)
|
|
|
for (int i = 0; i < editController->getParameterCount(); ++i)
|
|
|
{
|
|
|
{
|
|
|
Vst::ParameterInfo paramInfo = { 0 };
|
|
|
|
|
|
editController->getParameterInfo (i, paramInfo);
|
|
|
|
|
|
|
|
|
|
|
|
bool isDiscrete = paramInfo.stepCount != 0;
|
|
|
|
|
|
int numSteps = isDiscrete ? paramInfo.stepCount + 1
|
|
|
|
|
|
: AudioProcessor::getDefaultNumParameterSteps();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
auto paramInfo = getParameterInfoForIndex (i);
|
|
|
VST3Parameter* p = new VST3Parameter (*this,
|
|
|
VST3Parameter* p = new VST3Parameter (*this,
|
|
|
paramInfo.id,
|
|
|
paramInfo.id,
|
|
|
toString (paramInfo.title),
|
|
|
|
|
|
toString (paramInfo.units),
|
|
|
|
|
|
paramInfo.defaultNormalizedValue,
|
|
|
|
|
|
(paramInfo.flags & Vst::ParameterInfo::kCanAutomate) != 0,
|
|
|
|
|
|
isDiscrete,
|
|
|
|
|
|
numSteps);
|
|
|
|
|
|
|
|
|
(paramInfo.flags & Vst::ParameterInfo::kCanAutomate) != 0);
|
|
|
addParameter (p);
|
|
|
addParameter (p);
|
|
|
|
|
|
|
|
|
if ((paramInfo.flags & Vst::ParameterInfo::kIsBypass) != 0)
|
|
|
if ((paramInfo.flags & Vst::ParameterInfo::kIsBypass) != 0)
|
|
|
|