AU plugin sending midi

Is it still the case that Audiounits can’t send midi out? It certainly seems so.

And … that being the case … is it a reasonable workaround to use a system level MidiOuput from within a plugin? I’ve built a couple plugins that do this, and they seem to work fine, but is certainly unconventional.

Based on the links below, I’m pretty sure AudioUnits can send midi out. Not sure if it has been implemented in Juce’s AU plugin wrapper though.
It’s just that no AU hosts support it.

Hmmm … I’m guessing JUCE doesn’t support it then?!
The Juce host see’s the plugin with no midi output (the VST version has the midioutputs, of course).

Jules - ???

I’ve set the pluginType to kAudioUnitType_MusicEffect, and JucePlugin_ProducesMidiOutput to 1. Still, the plugin shows no midi outputs.

from - within the callback … should this be copying the midi to an output buffer perhaps, or is there just the one buffer?

if (! midiEvents.isEmpty())
#if JucePlugin_ProducesMidiOutput
const juce::uint8* midiEventData;
int midiEventSize, midiEventPosition;
MidiBuffer::Iterator i (midiEvents);

            while (i.getNextEvent (midiEventData, midiEventSize, midiEventPosition))
                jassert (isPositiveAndBelow (midiEventPosition, (int) numSamples));

            // if your plugin creates midi messages, you'll need to set
            // the JucePlugin_ProducesMidiOutput macro to 1 in your
            // JucePluginCharacteristics.h file
            //jassert (midiEvents.getNumEvents() <= numMidiEventsComingIn);


And yeah - is it seriously the case that there are NO hosts that support kAudioUnitProperty_MIDIOutputCallback? That’s hard to believe.

And … is it a reasonable alternative to initiate a system level midi connection (as you would do from a standalone program) for an AU plugin then? It seems to function fine, but is unconventional I assume.