VST3 Host Questions...

Hi there,

We’ve long had support for VST2, but I’m trying to add VST3 support.

I have them loading and I created a Steinberg::Vst::HostProcessData object and call m_pAudioProcessor->process but it just doesn’t output any new data with some plugins (and some do) in the Data.outputs->channelBuffers64.

I’m just hoping for any help. Thanks.

  1. did you check before that the plug-in could process 64 bits float ?
    canProcessSampleSize (kSample64) == kResultTrue
  2. do you follow the processing state machine? https://developer.steinberg.help/display/VST/VST+3+Workflow+Diagrams

hope it helps

Hi there.

All the plugins can process 64-bit.

Here’s my process call:

	if (m_pAudioProcessor != NULL)
	{
		Steinberg::Vst::BusInfo busInfo = {};
		bool bChannelMismatch = false;
		if (m_pProcessComponent->getBusInfo(Steinberg::Vst::kAudio, 0, 0, busInfo) == Steinberg::kResultTrue)
		{
			if (busInfo.channelCount != m_afInput.GetChannels())
				bChannelMismatch = true;
		}
		if (m_pProcessComponent->getBusInfo(Steinberg::Vst::kAudio, 1, 0, busInfo) == Steinberg::kResultTrue)
		{
			if (busInfo.channelCount != m_afInput.GetChannels())
				bChannelMismatch = true;
		}

		if (bChannelMismatch)
		{
			pOutput->JRDSPOutput_OutputDouble(pBuffer, nBlocks);
			return;
		}

		Steinberg::Vst::HostProcessData Data;
		m_pProcessComponent->setActive(true);
		Data.prepare(*m_pProcessComponent, nBlocks * m_afInput.GetChannels(), Steinberg::Vst::kSample64);
		Data.processMode = Steinberg::Vst::kRealtime;
		for (int nChannel = 0; nChannel < m_afInput.GetChannels(); nChannel++)
		{
			for (int nSample = 0; nSample < nBlocks; nSample++)
			{
				Data.inputs->channelBuffers64[nChannel][nSample] = pBuffer[nSample * m_afInput.GetChannels() + nChannel];
				Data.outputs->channelBuffers64[nChannel][nSample] = 0;
			}
		}

		Data.numSamples = nBlocks * m_afInput.GetChannels();
		if (m_pAudioProcessor->process(Data) != Steinberg::kResultTrue)
		{
			// problem processing
		}

		for (int nChannel = 0; nChannel < m_afInput.GetChannels(); nChannel++)
		{
			for (int nSample = 0; nSample < nBlocks; nSample++)
			{
				pBuffer[nSample * m_afInput.GetChannels() + nChannel] = Data.outputs->channelBuffers64[nChannel][nSample];
			}
		}

		Data.unprepare();

		// output
		pOutput->JRDSPOutput_OutputDouble(pBuffer, nBlocks);
	}

Here’s my setup when the audio format arrives:

		if ((m_pAudioProcessor != NULL) && (m_pProcessComponent != NULL))
		{
			m_pProcessComponent->setActive(false);
			Steinberg::Vst::ProcessSetup Setup;
			Setup.processMode = Steinberg::Vst::kRealtime;
			Setup.sampleRate = m_afInput.GetSampleRate();
			Setup.symbolicSampleSize = Steinberg::Vst::kSample64;
			Setup.maxSamplesPerBlock = 65536;
			if (m_afInput.GetChannels() == 2)
			{
				Steinberg::Vst::SpeakerArrangement Arrangement = Steinberg::Vst::SpeakerArr::kStereo;
				int nResult = m_pAudioProcessor->setBusArrangements(&Arrangement, 1, &Arrangement, 1);
				if (nResult == Steinberg::kResultFalse)
				{
					bResult = false; // arrangement not supported
				}
			}
			m_pAudioProcessor->setupProcessing(Setup);
			m_pAudioProcessor->setProcessing(true);
			m_pProcessComponent->setActive(true);
		}

I must be missing something, but I’m not sure what. Thanks so much for any help.

rapidly check
=>change the order:

m_pProcessComponent->setActive(true);
m_pAudioProcessor->setProcessing(true);
...
// process your audio
m_pAudioProcessor->process(..);
---
// when finished and you do not want to call any process any more
m_pAudioProcessor->setProcessing(false);
..
// want to disable the plug-in
m_pProcessComponent->setActive(false);

[/list]

I now setup this way:

// turn everything on
m_pAudioProcessor->setupProcessing(Setup);
m_pProcessComponent->setActive(true);
m_pAudioProcessor->setProcessing(true);

But still silence out of some plugins. Thanks for helping.

Hi all. I’d sure appreciate any help on this because I’m stumped. Thanks.

I do not know what is wrong with what you are doing, but I would suggest to use a simple VST3 plugin and modify it so that it logs every single call. You can then load the plugin in VST3PluginTestHost for example and look at the output to see what gets called in which order and with which parameters… then do the same with your host and compare the difference…

Yan