Access MIDI from an Audio Server driver plug-in

I have an audio box that also supports MIDI, but I can't figure out how to access CoreMIDI services from an Audio Server plug-in.

On calling MIDIClientCreate(), I see the following log:

com.apple.audio.Core-Audio-Driver-Service: (CoreMIDI) [com.apple.coremidi:client]         MIDIClientLib.cpp:258   Couldn't connect to com.apple.midiserver; CoreMIDI will not be usable

I've tried various incantations of the AudioServerPlugIn_MachServices key in the plug-in's Info.plist (per the documentation in AudioServerPlugin.h), but to no avail.

Is there some way to use MIDI from an Audio Server plugin? If no, how should such hardware be supported?

See https://bradleyross.github.io/ObjectiveC-Examples/Documentation/BRossTools/FunctionalArea.html. It looks like MIDIClientCreate doesn't work right and you have to use MIDIClientCreateWithBlock and my project is in https://github.com/bradleyross/ObjectiveC-Examples in the BRossTools. I would love to talk to people on how to get this working to do more. It appears that some functions have to run in a high-priority thread and others can't run in a high-priority thread.

Access MIDI from an Audio Server driver plug-in
 
 
Q