I'm reading up about how to use CoreMIDI to receive input from a MIDI keyboard. I found this excellent playground code to get going:
https://gist.github.com/jemmons/847cdc494eb332ba1b9f50f18ee8616a#file-receive-data-swift
This certainly works, but it makes use of MIDIInputPortCreate, which according to the documentation, is now deprecated:
https://developer.apple.com/documentation/coremidi/1495225-midiinputportcreate
The thing is though, I can't find any alternatives. And if it was deprecated, I would have expected the related functions, MIDIClientCreate, MIDIPortConnectSource, and MIDIOutputPortCreate to similarly be deprecated in favor of some new approach.
But those related functions are not. In light of that, what is the reason that MIDIInputPortCreate, and what is the alternative method to use if it is deprecated?
https://gist.github.com/jemmons/847cdc494eb332ba1b9f50f18ee8616a#file-receive-data-swift
This certainly works, but it makes use of MIDIInputPortCreate, which according to the documentation, is now deprecated:
https://developer.apple.com/documentation/coremidi/1495225-midiinputportcreate
The thing is though, I can't find any alternatives. And if it was deprecated, I would have expected the related functions, MIDIClientCreate, MIDIPortConnectSource, and MIDIOutputPortCreate to similarly be deprecated in favor of some new approach.
But those related functions are not. In light of that, what is the reason that MIDIInputPortCreate, and what is the alternative method to use if it is deprecated?
The header doc (you can see with Context menu > Jump to Definition) says renamed: "MIDIInputPortCreateWithProtocol(_:_:_:_:_:)".what is the alternative method to use if it is deprecated?
MIDIInputPortCreateWithProtocol(_:_:_:_:_:)
As found in the doc of MIDIInputPortCreateWithProtocol, it has a parameter MIDIProtocolID. I guess Apple wants developers to be ready for MIDI 2.0.what is the reason that MIDIInputPortCreate