So, I have written a iOS MIDI controller app using AudioKit (v5). The connectivity part is as simple as:
let engine = AudioKit.MIDI()
engine.createVirtualOutputPorts()
engine.openOutput()
I then send notes to the engine with engine.sendEvent
. That's it. It almost works ok with no setup, you have to run the app after the virtual instrument you want to play, but it auto-connects to it.
I'm porting this app to be AUv3 compatible and run in Hosts like AUM. So far, I was able to have the app recognised by AUM and loaded into the host, but how to connect it properly? The user can select, from AUM interface, an actual midi output where to send the MIDI events so that other app can listen to that virtual MIDI device.
How to go from this
let engine = AudioKit.MIDI()
engine.createVirtualOutputPorts()
engine.openOutput()
To actually select a MIDI output for my app chosen by the user in a "standard Audiounit" integrated mode?