There is still an issue with defining callbacks in CoreMIDI with Swift, so the workaround is to use Objective-C. I found this answer, but I cannot figure out how to use MIDIReadProcCallback.setOnCallback({ (packetList: MIDIPacketList) in ... })
from this answer: https://stackoverflow.com/a/26139259/616873.
I cannot comment on the specific answer for more clarification because my rep is not 50, so if anyone can point me to some sample code or further clarification, I would be very appreciative.