I’m developing a plugin that, by default, is just a stereo drum synth. However, I’d like the user (through the DAW) to be able to add 6 extra buses, one for each of the channel outputs to have a multiout mode.
At various points, I’ve had Logic recognise my plugin as having Stereo and (7xStereo) modes and Reaper equally happy to send stuff to multiple channels, however not at the same time. Logic sometimes displays (3xStereo, 4xMono) and now refuses to give me any options other than Stereo, 16xStereo and 25xStereo - but crashes anyway loading the ones that aren’t just regular Stereo. I’ve Reset and Rescanned, etc. etc. but no luck.
I want the stereo mode to output audio if there are no other available/enabled buses, but if another bus is available (like Logic has added one or Reaper’s pin is connected) it takes the ‘next’ track out of the main output and just uses the Bus.
I’ve got various parts of this working at various points today across Reaper, Ableton and Logic but never all at once and it seems I change one thing, it breaks, I revert and its still broken! I’ve also noticed that I had it working for AU on Reaper (or some of it was working) but then loading the VST3 version it was just mono coming out of the left ear with no other buses or channels used.
For my isBusesLayoutSupported;
if (layout.inputBuses.size() > 1) {
return false;
}
if (layout.getMainOutputChannelSet() == AudioChannelSet::disabled()
|| layout.getMainOutputChannelSet() != AudioChannelSet::stereo()) {
return false;
}
int numActiveOutputBuses = 0;
for (auto bus : layout.outputBuses) {
//each bus must be stereo if its enabled
if (bus != AudioChannelSet::stereo() &&
(!bus.isDisabled())) {
return false;
}
if (!bus.isDisabled()) {
numActiveOutputBuses++;
}
}
// I need at least 1 buffer and dont need more than 7 (1 main and 6 tracks)
return numActiveOutputBuses >= 1 && numActiveOutputBuses <= NUM_TRACKS+1;
My constructor;
AudioProcessor (BusesProperties()
.withOutput("Stereo Output", juce::AudioChannelSet::stereo(), true)
.withOutput("Voice 1", juce::AudioChannelSet::stereo(), false)
.withOutput("Voice 2", juce::AudioChannelSet::stereo(), false)
.withOutput("Voice 3", juce::AudioChannelSet::stereo(), false)
.withOutput("Voice 4", juce::AudioChannelSet::stereo(), false)
.withOutput("Voice 5", juce::AudioChannelSet::stereo(), false)
.withOutput("Voice 6", juce::AudioChannelSet::stereo(), false))
Once I’ve got Logic displaying Stereo and 7xStereo and Reaper being happy to assign all 14 channels, then I can move back to the processBlock to get the outputs going the right places at the right time.
Any help much appreciated