Reputation: 21
In my project, I need to have several virtual Output Ports. How can I build multiple midi output ports in my app using AudioKit so that my project can send midi information through different midi ports and see these changes in the audio midi setup? I have a simple code that does not build multiple ports and causes the midi studio on the MacBook to malfunction.
let midi = MIDI()
midi.createVirtualOutputPorts(count: 2)
var midiID1 = midi.virtualOutputUIDs[0]
var midiID2 = midi.virtualOutputUIDs[1]
midi.openOutput(uid: midiID1)
midi.openOutput(uid: midiID2)
What the problem of my code, and how to create two midi output port so the audio midi setup could observe the changes.
Upvotes: 1
Views: 11