AU plugin sending *both* Audio and MIDI

Hi there :slight_smile:

So I’ve made a plugin - all it does is generates sound pulses. The plugin also sends MIDI Data.
It works fine as an AAX and VST3.

As an AU it seems that a kAudioUnitType_MusicDevice cannot send MIDI Data. I can create a kAudioUnitType_MIDIProcessor - that works but then it only sends MIDI and not audio.

I’ve been trying a few different AU types - Apple documentation is not great, and I could not find one that could both output Audio and MIDI in Logic.

Any ideas?

Thank you!

AU instruments can’t send MIDI out.

Our solution for that is to bundle an additional plugin in our installer, that’s a MIDI FX component, in addition to the “Instrument” version of the AU. Same is true for AUv3.

1 Like

With your solution, how do you make sure the produced midi is sample accurately synced with the instrument?

Could maybe a kAudioUnitType_MusicEffect send out both audio and midi? It probably could as far as the AU wrapper is concerned and Logic can load these into instrument slots, but as far as I can see, there’s no way in Logic to route output midi anywhere :slightly_frowning_face: .

The two variations of the plugin I deliver are almost identical in code. The MIDI gets processed in processBlock() and is sent out sample accurate just like how I do it in the VST version.

BTW, in Logic MIDI FX are loaded into the MIDI FX slot, so they show up in the channel before the instrument.
“Sync” is something we do internally in the plugin, so we decide when to output notes according to the PPQ at each sample according to the playhead. That part doesn’t change between the instrument and MIDI FX version, and both versions indeed output the same timing.

Nice, thanks for the feedback. That’s also what I’ve decided to do, two plugins, one to load as “instrument” and one to load as “MIDI FX” plugin. At least that works :wink:

Not only Logic, I tried loading the AU in Ableton for example, and I cannot get the MIDI out of it (while I can without issues using the VST3).

Here the whole thing falls over.

You can’t output MIDI from AU Instrument
You can’t load MIDI FX AU in anything other than Logic (afaict)

The only solution in Live (or any other AU compatible host that isn’t Logic) is to use VST3.

1 Like

Thanks for the reply :slight_smile:
But VST3 is fine for Live - I was just testing the AU outside Logic to see if this was a Logic limitation or an AU limitation, it turns out it is both :wink: