I’m trying to get the audio from the sidechain input to mix with the main input of my audio plugin but I can never hear it. When I load the plugin in Cubase, I can see that Cubase is sending the audio signal to the sidechain input via the “setup sidechain inputs” tab so at the moment I’m presuming it is getting in.
My fader works for the main incoming audio but nothing for the sidechain
I’m trying this
: AudioProcessor(BusesProperties()
.withInput("Stereo In", juce::AudioChannelSet::stereo(), true)
.withOutput("Stereo Out", juce::AudioChannelSet::stereo(), true)
.withInput("Sidechain", juce::AudioChannelSet::stereo(), true)
::processBlock
auto* channelData1 = buffer.getWritePointer(0);
for (int sample = 0; sample < buffer.getNumSamples(); ++sample)
{
channelData1[sample] = channelData1[sample] * juce::Decibels::decibelsToGain(gain_CH01);
}
auto* channelData2 = buffer.getWritePointer(1);
for (int sample = 0; sample < buffer.getNumSamples(); ++sample)
{
channelData2[sample] = channelData2[sample] * juce::Decibels::decibelsToGain(gain_CH01);
}
auto* channelData3 = buffer.getWritePointer(2);
for (int sample = 0; sample < buffer.getNumSamples(); ++sample)
{
channelData3[sample] = channelData3[sample] * juce::Decibels::decibelsToGain(gain_CH01);
}
auto* channelData4 = buffer.getWritePointer(3);
for (int sample = 0; sample < buffer.getNumSamples(); ++sample)
{
channelData4[sample] = channelData4[sample] * juce::Decibels::decibelsToGain(gain_CH01);
}
I know this can be written better with for loops but I’m trying to break it down a bit so I can understand what is (isn’t) happening.
Any help appreciated.
-Edited - Formatting