I needed some documentation about buses management in JUCE, and the following topic helped me to understand some points.
https://forum.juce.com/t/the-ultimate-juce-4-1-multibus-guide/16755/
I just discovered JUCE few days ago. I’m learning every hours I spend on my code.
The weird thing with Projucer configuration is the “is Synth” and “channels config”. I just created a simple sinewave synth (no gain or delay params, nothing but the sinewave), and the plugin can make sounds only with configuration {1,1},{2,2}, which is strange since I don’t use any input channel (or maybe Midi is seen as input, so why I need two inputs to work ?). I tested with “Plugin Host” example app, but for Standalone version (AUv3) inputs channels are set by default on my Mic In and create big Larsen effects…
To more, I can’t set the “isSynth” to true (if i do there’s no sound too, tested with VSTv2 and VSTv3 with Plugin Host example and Standalone (AUv3)).
Since I’m just working on this simple synth, the configuration in my mind was :
-isSynth: true
-Midi Input: true
-Midi Output: false
-channels: {1,2} // (Midi input, Left & Right ouputs)
-Midi Effect Plugin : false
-Key Focus: true
But I have no sound with this configuration and I would know why.
My code looks like the example of audio plugin, but without gain or delay parameters.
void processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages) override
{
const int numSamples = buffer.getNumSamples();
keyboardState.processNextMidiBuffer (midiMessages, 0, numSamples, true);
synth.renderNextBlock (buffer, midiMessages, 0, numSamples);
for (int i = getTotalNumInputChannels(); i < getTotalNumOutputChannels(); ++i)
buffer.clear (i, 0, numSamples);
}
Thank you