i'm facing an issue with my VST3 implementation and Samplitude.
Basically, one of our testers has reported that our plug-in loads fine in Samplitude but controls don't change anything, soundwise.
I've downloaded the Samplitude trial version and I've done some debugging and discovered that parameter changes (both from the GUI editor and the Samplitude default editor) are working correctly, but upon the process call, the parameter changes counter is always zero, so the audio engine is not performing any update and the sound remains the same.
Samplitude has been the only host showing this behavior so far, the plug-in works fine in Reaper, Studio One and Cubase.
It's the first time I support the VST3 standard, so I'm probably missing something, but after hours of debugging I couldn't find the culprit.
Here are some code snippets from my VST3 wrapper.
Parameters creation:
Code: Select all
void VST3PlugInWrapper::EditController::setAudioApplication(AudioApplication* app)
{
assert(app != nullptr);
application = app;
//Initialize parameters
parameters.removeAll();
for (int i = 0; i < application->getCore()->getNumParameters(); ++i)
{
const AudioApplicationCore::ParameterType& p = application->getCore()->getParameterDescriptor(i);
parameters.addParameter(
p.getName().toUTF16().get(),
p.getLabel().toUTF16().get(),
0,
p.getNormalizedDefaultValue(),
Steinberg::Vst::ParameterInfo::kCanAutomate,
i,
Steinberg::Vst::kRootUnitId
);
}
}
Code: Select all
void VST3PlugInWrapper::AudioProcessor::VST3HostHandler::notifyBeginParameterChange(int index)
{
if (editController)
editController->beginEdit(index);
}
void VST3PlugInWrapper::AudioProcessor::VST3HostHandler::notifyEndParameterChange(int index)
{
if (editController)
editController->endEdit(index);
}
void VST3PlugInWrapper::AudioProcessor::VST3HostHandler::notifyParameterChanged(int index, float value)
{
if (editController)
{
editController->setParamNormalized(index, value);
editController->performEdit(index, value);
}
}
Code: Select all
Steinberg::tresult PLUGIN_API VST3PlugInWrapper::AudioProcessor::process(Steinberg::Vst::ProcessData& data)
{
//Read inputs parameter changes
Steinberg::Vst::IParameterChanges* paramChanges = data.inputParameterChanges;
if (paramChanges)
{
const Steinberg::int32 numParamsChanged = paramChanges->getParameterCount(); //ALWAYS ZERO :-(
for (Steinberg::int32 i = 0; i < numParamsChanged; ++i)
{
Steinberg::Vst::IParamValueQueue* paramQueue = paramChanges->getParameterData(i);
if (paramQueue)
{
Steinberg::Vst::ParamValue value;
Steinberg::int32 sampleOffset;
const Steinberg::int32 numPoints = paramQueue->getPointCount();
const Steinberg::Vst::ParamID idx = paramQueue->getParameterId();
//Update processor with last parameter values
if (paramQueue->getPoint(numPoints - 1, sampleOffset, value) == Steinberg::kResultTrue)
application->getCore()->setProcessorParameterValue(idx, value);
}
}
}
...
}