VST3 Host Questions...

SDK for VST 3 audio plug-in and host development.
Post Reply
MAshland
Posts: 4
Joined: Wed Sep 09, 2020 11:58 am

VST3 Host Questions...

Post by MAshland »

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.

User avatar
ygrabit
Posts: 172
Joined: Fri Jun 17, 2016 7:52 am
Location: Hamburg
Contact:

Re: VST3 Host Questions...

Post by ygrabit »

  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/displa ... w+Diagrams
hope it helps
YVan Grabit

MAshland
Posts: 4
Joined: Wed Sep 09, 2020 11:58 am

Re: VST3 Host Questions...

Post by MAshland »

Hi there.

All the plugins can process 64-bit.

Here's my process call:

Code: Select all

	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:

Code: Select all

		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.

User avatar
ygrabit
Posts: 172
Joined: Fri Jun 17, 2016 7:52 am
Location: Hamburg
Contact:

Re: VST3 Host Questions...

Post by ygrabit »

rapidly check
=>change the order:

Code: Select all

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]
YVan Grabit

MAshland
Posts: 4
Joined: Wed Sep 09, 2020 11:58 am

Re: VST3 Host Questions...

Post by MAshland »

I now setup this way:

Code: Select all

// 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.

MAshland
Posts: 4
Joined: Wed Sep 09, 2020 11:58 am

Re: VST3 Host Questions...

Post by MAshland »

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

User avatar
pongasoft
Posts: 116
Joined: Sun Mar 11, 2018 5:57 pm
Location: Las Vegas, USA
Contact:

Re: VST3 Host Questions...

Post by pongasoft »

MAshland wrote:
Mon Sep 14, 2020 12:45 pm
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

Post Reply