Numula is a Python library for making computer-rendered music with complex, layered variation in dynamics, timing, articulation and pedaling, as is typical in human performance. Numula can be used to render existing compositions or for algorithmic composition. It provides textual "shorthand" notations for scores and nuance. The output of a Numula program is a MIDI file.
Numula is open-source and is on Github: