Computer-assisted composition in Python