PMIDI: Python MIDI library for Windows
The PMIDI library allows the generation of short MIDI sequences in Python code. The interface allows a programmer to specify songs, instruments, measures, and notes. Playback is handled by the Windows MIDI stream API so proper playback timing is handled by the OS rather than by client code. The library is especially useful for generating earcons.