Plugin host no sound with some effect plugins


We created our home made audio plugin host. And we have an issue with some effect plugins. For example “FabFilter Pro-C 2” or “FabFilter Pro-Q 3”. Our processBlock process the sound of each instrument plugins first, and then give the audioBuffer to each effect plugins.

The problem is, when we add some piano plugin, and a FabFilter effect plugin, we can’t hear the piano. And there is some ugly noises.

void OurPluginHost::processBlock(AudioBuffer<float>& audioBuffer, MidiBuffer& midibuffer) {
	//std::vector<AudioProcessor*> instrumentPlugins;
	//std::vector<AudioProcessor*> effectPlugins;
	int i=0;
	for(AudioProcessor* instrument : instruments) {
		instrument->processBlock(tracks[i++], midiBuffer);
	for(AudioProcessor* effect : effects) {
		effect->processBlock(audioBuffer, midiBuffer);

This problem doesn’t happen with the juce audio plugin host. So the problem is in our source code. We found a fix that works with vst3 plugins effects only :
But it changes nothing with vst 2 or audio units.

We’re not really familiar with the bus concept. Any clues are welcome ! :slight_smile:

There is not much to go on, but I’ll throw out my first thoughts:

  • did you call prepareToPlay on all plugins and instruments?
  • what does mergeTracksOn?
  • is the number of channels for all processors the same? I could imagine for some instruments to produce multi-bus output.
  • do all processors support that bus layout?

Good luck

Thank you for your answer :slight_smile:

  • yes I’m sure about that
  • all instruments plugins process on an audioBuffer separate (called track). Then we sum all these tracks in audioBuffer like a master track. And this audioBuffer is given to the effect plugins.
  • What do you mean ? In our case, if our audioBuffer is not big enough, we add the missing channels. So each plugins could have different number of channels

I am not 100% sure, what information is passed on to the host, but in the processBlock, some plugins simply process all available channels, but some also evaluate the information, which is provided by processor.setBusesLayout().

The other thought, if you want your processor only to process a certain pair, you should create a referencing buffer, e.g. to process channels 5 and 6:

float* pointers [2];
pointers [0] = buffer.getWritePointer (5);
pointers [1] = buffer.getWritePointer (6);
AudioBuffer<float> proxy (pointers, 2, buffer.getNumSamples());
processor.processBlock (proxy, midi);