Nodi provides types and functions for abstracting MIDI files.
This crate works alongside with the midly and midir crates.
Please check out the source code of plmidi for an implementation.