Detect if running as MIDI Instrument

My plug-in has the option to run as a MIDI-controlled effect (AU type aumf), accepting audio input from another track and processing it according to the MIDI input.

However, Logic Pro X does not properly compensate the latency of the audio output when running as a MIDI-controlled effect.

Is there a way to detect whether the plug-in is running as a MIDI-controlled effect, so I can automatically turn on the “live processing mode” of my plug-in that does not add any latency?

Is it not possible to detect whether the plug-in is running as a MIDI instrument?


You could check if the MIDI buffer is non-empty, right?

That could be an approach, yes, however it would only trigger once the first MIDI input is received.

Digging into the AU documentation a little bit I don’t think what you’re after is possible, at least not in AU. It seems like that information isn’t available to the plugin until the host is about to render it anyway.

Another (less ideal) workaround is to have two plugin versions, one that accepts MIDI and one that doesn’t.

1 Like

Thank you very much for your research efforts.
I guess I’ll simply switch to “live mode” as soon as a MIDI note is received.

I’m not an Objective C expert so take my digging with a grain of salt, to me this would be a really useful feature. I think it could be done in VST3, not sure about AAX.

1 Like