I would like to have a python implementation of a musical instrument library (for instance, a piano object) that I can use to convert a list of notes and a duration into sou
A subset of @Marcelos answer: http://code.google.com/p/mingus/
mingus is a package for Python used by programmers, musicians, composers and researchers to make and investigate music. At the core of mingus is music theory, which includes topics like intervals, chords, scales and progressions.
The MIDI package can save and load MIDI files, and -last but not least- provides a general purpose sequencer for all the containers and a FluidSynth sequencer subclass. This allows you to play all your data structures straight from Python in just a couple of lines. Most of the icky timing and MIDI code has been abstracted away for you, leaving a clean, relatively simple API.