Music21
lastmod 2026-11-10created 2023-03-232 edits
music21 is a Python library for musicology research developed at MIT. It represents a score as a stream of objects such as notes, chords, measures, and voices, and reads and writes many formats including MusicXML, MIDI, and ABC. Along with analysis features such as key analysis, harmonic analysis, and pattern search, it can call MuseScore or LilyPond to render scores, so it is used for music data analysis and algorithmic composition.