Plugin channel questions

I’m working on an audio processor that should have two configurations… one mono input that produces a stereo output (the input track would be duplicated to stereo and processed), and stereo input to stereo output. As a new developer, it’s confusing how these configurations are supposed to be created.

Is it up to my plugin to determine how many inputs are coming in and handle each configuration separately? Or do plugin manufacturers make separate versions of each plugin for each input/output configuration?

Also, does Juce handle the creation of plugins that have more outputs than inputs? The default action in processBlock() is to clear the “extra” buffer channels, so it seems like its not supposed to.

Thanks for any help.

If you’re using the Introjucer you would need to use “{1, 2}, {2, 2}” in the plugin channel configuration field. Your plugin’s AudioProcessor will know how many in/output channels you actually get and can tell you via getNumInputChannels() / getNumOutputChannels().

The clearing of extra buffer channels is only needed if you don’t supply content for the additional channels yourself. Without it an “empty” plugin with more output than input channels might output noise (as the input buffers are simply allocated but not cleared).


Excellent, thank you. So hypothetically, if I am using the Audio Plugin Host, and I route one input to my plugin and run getNumInputs(), it should return 1, and if I routed another input it should return 2? If this is the case, the configuration would have to be checked often, no? Is this check something that’s typically done in processBlock()?