Midi-di is a library for reading and writing MIDI music data. It is written completely in D and it has no dependencies other than the D standard library (phobos).
Github page: [link].
DUB package: [link].
The implementation and some of the documentation is based on this specification.