lightweight module for writing MIDI files