Mingus is a music package for Python
mingus is a package for Python used by programmers, musicians, composers
and researchers to make and analyse music.
pip install mingus
Browse the documentation