Algorithmic music generation with python