Detect if running as MIDI Instrument

midi

#1

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?


#2

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


#3

Bump


#4

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


#5

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


#6

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.


#7

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.


#8

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.