Hallo!
(unless somebody else does it first...). The ideal would be to have midifile work the same way as qlist, with only the internal encoding of the data being different, the advantage being that other sequencers besides pd will be able to read it.
you could also use the xeq external to read and write MIDI files ... (and I think there is also an other one)
LG Georg