From 7f8d822340128752ca5fb68b91c91738376f506b Mon Sep 17 00:00:00 2001 From: Christoph Hart Date: Wed, 3 Jan 2024 22:50:33 +0100 Subject: [PATCH] - fix send container FX not processing modulators --- hi_core/hi_modules/effects/fx/RouteFX.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hi_core/hi_modules/effects/fx/RouteFX.h b/hi_core/hi_modules/effects/fx/RouteFX.h index 5462f947f4..0d1cc5dc6b 100644 --- a/hi_core/hi_modules/effects/fx/RouteFX.h +++ b/hi_core/hi_modules/effects/fx/RouteFX.h @@ -108,9 +108,13 @@ struct SendContainer : public ModulatorSynth { finaliseModChains(); getMatrix().setAllowResizing(true); - - } + auto constrainer = new NoMidiInputConstrainer(); + + effectChain->getFactoryType()->setConstrainer(constrainer, true); + effectChain->setForceMonophonicProcessingOfPolyphonicEffects(true); + } + void numSourceChannelsChanged() override { prepareToPlay(getSampleRate(), getLargestBlockSize()); @@ -185,11 +189,14 @@ struct SendContainer : public ModulatorSynth { numSamplesToProcess = outputAudio.getNumSamples(); AudioSampleBuffer truncatedInternalBuffer(internalBuffer.getArrayOfWritePointers(), internalBuffer.getNumChannels(), numSamplesToProcess); + + effectChain->renderNextBlock(truncatedInternalBuffer, 0, numSamplesToProcess); effectChain->renderMasterEffects(truncatedInternalBuffer); } else { numSamplesToProcess = internalBuffer.getNumSamples(); + effectChain->renderNextBlock(internalBuffer, 0, numSamplesToProcess); effectChain->renderMasterEffects(internalBuffer); }