An example using Core MIDI with Swift 3.
There are also two hacky Playgrounds. One works. The other one tries to create an input port and fails. (makes sense actually)
Meta text events are a mess with that tuple nonsense. That will be another blog post.
I'm using the Fluid R3 GM Sounfont in this example. Use whatever Soundfont you like. (GeneralUser GS 1.442 has many problems)
If you find one, please add it to issues
Please read the LICENSE for details.