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?