It's still very young, but here is the library I've been working on for generating music in (nothing but) Python. "test.py" is an example of what you can do. The real purpose isn't to code your music out this way, it's intended as a backend for generating / manipulating music. My end goal is a tab-based editor that plays back with this, but I'm going to keep working on this backend and hope some brave snake wrestler comes along and has the itch to write a proper interface (and if that doesn't happen, I'll start on the interface when I feel satisfied with the backend).
The Timeline and Hit classes are just ideas right now. I'm not sure they'll stay in the form they are (I'm thinking a guitar-oriented timeline, holding fret/string/amplitude per hit, is more along the lines of what I need).
I'm also on the hunt for efficient numpy/scipy implemented effects and sound sources. I've been playing around some with generating Karplus-Strong pluck sounds and delay/chorus/flanger effects, but I'm not exactly satisfied with the sound and runtime efficiency of what I have.
Be sure to check out the "minor" scale version of this "major" progression.
Also be sure to let me know if you have any advice on optimizing (without jumping into the C just yet) or creating a better code interface / representation of these concepts.