I am using AudioKit's AKMIDIListener protocol on a class to listen for MIDI messages. This is working fine for standard messages such as Note On
, but SysEx
messages are not coming through.
func receivedMIDINoteOn(noteNumber: MIDINoteNumber, velocity: MIDIVelocity, channel: MIDIChannel) {
NSLog("Note On \(noteNumber), \(velocity), \(channel)") // works perfectly
}
func receivedMIDISystemCommand(_ data: [MIDIByte]) {
NSLog("SysEx \(data)") // never triggers
// More code to handle the messages...
}
The SysEx messages are sent from external hardware or test software. I have used MIDI monitoring apps to make sure the messages are being sent correctly, yet in my app they are not triggering receivedMIDISystemCommand
.
Are there any additional steps required to receive SysEx messages that I'm missing?
Thanks in advance for any clues.
NSLog("SysEx \(data)")
mentioned does not trigger at all. Nothing is being logged, suggesting thereceivedMIDISystemCommand
is never run. Thanks for the suggestion though, usingAKMIDISystemCommand
will definitely clean up my code a bit. – Jeep