0

I have a small app receiving MIDI from Bluetooth channel. It works well using Core APIs, so I tried to use AudioKit to simplify my code.

Problem is : I can't see the SysEx events in the listener (although I see them in my basic code). Other midi events are received.

            AKMidi = AudioKit.midi
            AKMidi?.addListener(AVKMIDIControl())
...
                AKMidi?.openInput(index: i)
...
class AVKMIDIControl:AKMIDIListener {
...
// copy paste from audiokit.io example
    func receivedMIDISystemCommand(_ data: [MIDIByte]) {
        if let command = AKMIDISystemCommand(rawValue: data[0]) {
            var newString = "MIDI System Command: \(command) \n"
            for i in 0 ..< data.count {
                newString.append("\(data[i]) ")
            }
            print(newString)
        }
    }
...

I should be receiving SysEx events in the listener (btw,I implemented all other functions to be sure I am catching everything), but I only get log messages like AKMIDI.swift:startReceivingSysex(with:):102:Starting to receive Sysex AKMIDI.swift:stopReceivingSysex():107:Done receiving Sysex

but nothing through the listener...

How can I get the Sysex message data ?

Louis
  • 1
  • 4

1 Answers1

0

I can confirm this behavior in the current version (4.7.2), however: in version 4.5.6 sysex (and other MIDI messages) are received by your midilistener. So my app is still using that version. for some reason receiving MIDI just seems broken in later versions.

But version 4.5.6 is not perfect too. It cuts large sysex messages into multiple small messages. I have some code to deal with that, let me know if you need it.

Maarten L.
  • 86
  • 4
  • Thanks a lot for the confirmation. I will continue to use my own app until this library have been fixed. – Louis May 25 '19 at 07:28
  • Hi Maarten, i would be interested in your code. I am receiving a large sysex with Audiokit (which is composed by a matter of fact of multiple sysexes). But Audiokit receives only the first F7 ... F0 block... and then writes to console 'Starting to receive Sysex..' but stops there.... as if it detected multiple sysex messages but has not been able to complete...... Thanks very much – Demy Mortelliti Mar 03 '20 at 13:35