Audiokit 4.9 midi input no longer working IOS

Viewed 373

Did something change with the latest version 4.9 regarding MIDI input? Seemed to work well with 4.7 but now only MIDI out is working. Tested using IOS 12 and 13.

On startup I'm calling midi.openInput() and then midi.addListener(self) then using the delegate functions to receive messages.

3 Answers

@Uncle Kenny,

I don't believe the MIDI input issue is with AudioKit; the change seems to revolve around how Xcode 11, iOS 13, and macOS Catalina are now handling (or not handling) MIDI. AudioKit 4.9 is the version that compiles with Xcode 11.1. Its MIDI library should be the same, but that could be the problem; Apple may have changed it without warning.

Can you get your MIDI controller to control any other MIDI app on iOS 13, such as Animoog, GarageBand, or ? I can't trigger any of the Korg synths or GarageBand via my KMI QuNexus controller, and it used to work without a hitch prior to iOS 13. So, that's why I don't believe that the MIDI issues are limited to AudioKit. But, I could be wrong.

As you may know, many music hardware and software companies are advising musicians to not upgrade to macOS Catalina or iOS 13, if they wish to keep their existing workflow, or continue performing with external MIDI devices:

Another oddity, is, the iOS 13 simulators in Xcode 11.1 don't include the necessary MIDI drivers to run MIDI-enabled apps successfully. Here's a workaround:

https://github.com/AudioKit/AudioKit/issues/1872#issuecomment-536223521

I recommend that you file a bug report about it. We all should, because this is a serious issue that appears to be breaking the MIDI experience on iOS and macOS. If there are new MIDI changes, Apple should be loud and clear about what those are.

https://developer.apple.com/bug-reporting/

I hope that this helps.

Make sure you are correctly implementing the AKMIDIListener protocol. There were some changes recently for adding portID for the MIDI input and offset to make sample-accurate MIDI handling. Your method signatures for the protocol should include these new elements like this:

func receivedMIDINoteOn(noteNumber: MIDINoteNumber,
                        velocity: MIDIVelocity,
                        channel: MIDIChannel,
                        portID: MIDIUniqueID? = nil,
                        offset: MIDITimeStamp = 0) {

if you still have:

func receivedMIDINoteOn(noteNumber: MIDINoteNumber,
                        velocity: MIDIVelocity,
                        channel: MIDIChannel) {

that won't be called anymore, you need the two new parameters. HTH

This problem is solved by updating to iOS 13.3 but as Aurelius points out you also have to update the AKMIDIListener protocol

Related