This file is a port of some old C code I had for reading and writing .mid files. Not much docs, but viewing the source may be helpful.
I'll eventually refactor it into something more D-like
Written in C in August 2008
Minimally ported to D in September 2017
Updated May 2020 with significant changes.