Python classes for reading/writing/parsing MIDI files

Will Ware wware at alum.mit.edu
Thu Dec 6 07:26:24 EST 2001


Nearly a year ago I wrote some Python classes for MIDI events and objects.
These made it possible to parse an existing MIDI file to produce a meaningful
Python data structure, and I used that to do some music synthesis in
software. The classes are now also capable of writing a MIDI file. Thusfar
the only test I've done has been to read in one MIDI file, parse it to
Python data structures, and write out another, and make sure they sound
identical; I haven't yet done anything like a composer's user interface to
create Python data structures from scratch. Hopefully something like that
will come soon.

http://groups.google.com/groups?selm=3C0F0BD2.25B6F825%40alum.mit.edu&output=gplain

Due to a bit of stupidiy on my part about setting up the formatting on my
newsreader, there are a few formatting errors where lines wrapped in the
wrong places. This happens once in the Enumerations class, once in the
MidiEvent class, two harmless occurrences in the docstring of the
MidiChannel class, and once in the MidiTrack class. The extra line breaks
in MidiEvent and MidiTrack were lucky enough to fall inside parentheses
and should have no effect.



More information about the Python-list mailing list