Did you define the audio channel configuration of the plugin to enable audio inputs?
e.g you can do it directly in Projucer:
(Note that in this configuration with the plugin defined as a synth audio is processed as a sidechain input to the synth in most DAWs)
@fredofaure Please try unchecking “Plugin is a Synth”. I think it forces the plugin to act like a synth (which accepts midi inputs and produces audio output). For want you want to achieve, I think you don’t need your plugin to act like a synth. Audio input/output channels are enabled by default as per the default bus layout (as highlighted by @wavesequencer) specified by JUCE. So, all you need to do is set the JUCE Characteristics to allow MIDI in and MIDI out.
I built an example AU plugin and was able to load it in JUCE’s AudioPluginHost (please see screenshot). It seems to produce the expected results.
P.S. This input/output layout in a plugin may not be supported by all hosts/DAWs. I haven’t tried Ardour before - but from your original post it seems Ardour will be able to handle Audio & MIDI inputs.outputs at the same time. Hope this helps!
In my specific (maybe unusual) case I built a synth, and set ‘plugin is a synth’ and also enabled audio inputs - the audio is processed as a side chain input in the DAW - so it’s optional to process external audio (from other tracks) via my synth effects processing busses by design. For example you might feed a bass drum into the side chain of a compressor on a pad sound (within the synth patch)… or just take advantage of processing a voice track with some crazy modular FX patching which can be modulated by other synth parameters as the synth sounds are being played.
Of course if you are building an effect plugin and want to be able to apply it to a track directly (to process other plugins in the chain), then don’t check ‘plugin is a synth’.
Reaper is one DAW that allows you to chain synth plugins on the same track - so you could still treat a synth like an effect if it has sidechain inputs, but generally it’s not the case, but most major DAWs have a sidechain input option for synth plugins when you declare it also has audio inputs.
The main point is properly declaring audio inputs/outputs in your code or in Projucer.