mididi.def contains definition enums and types important to MIDI files.
mididi.reader contains functions for reading the MIDI format.
The implementation (and some of the documentation) is based on this specification: https://www.cs.cmu.edu/~music/cmsip/readings/Standard-MIDI-file-format-updated.pdf
mididi.writer contains functions for encoding MIDI objects to raw bytes.