MidiParser is a wrapper library of AudioToolbox.framework about SMF(Standard Midi Files) that makes it easy to read/write midi files.
AudioToolbox framework provides many useful APIs for MIDI, but they are not Swifty styles (bridging with C pointers, explicit deallocation, etc).
MidiParser wraps them and make more Swifty to access properties.
let track = midi.noteTracks[0]
print(track.count) // number of note events in the track
print(track[0]) // get note event from index with subscript
// MidiNote(timeStamp: 0.0, duration: 0.533333361, note: 45, velocity: 78, channel: 0, releaseVelocity: 64)
MidiParser
MidiParser is a wrapper library of AudioToolbox.framework about SMF(Standard Midi Files) that makes it easy to read/write midi files.
AudioToolbox framework provides many useful APIs for MIDI, but they are not Swifty styles (bridging with C pointers, explicit deallocation, etc). MidiParser wraps them and make more Swifty to access properties.
UnsafePointers
,CF
typesEnum
for constantsUsage
Read
Import *.mid file
Midi Events
Write
open with GarageBand…
Installation
Carthage
To install using Carthage, add the following line to Cartfile:
github "matsune/MidiParser"