$npx skillfedfor your agent

music21

A Toolkit for Computer-Aided Musical Analysis and Computational Musicology.

With conditionsPyPI Python ModulesReleased Jun 2026409.5K downloads / moBSD-3-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — music21-10.5.0-py3-none-any.whl
v10.5.0 · released 2026-06-17 · Python >=3.11 · 8 runtime deps: chardet, joblib, jsonpickle, matplotlib, more-itertools, numpy, requests, webcolors

Yes, if you work with symbolic music notation, analysis, or computational musicology. Low install friction, active maintenance, no known vulnerabilities, and permissive licensing make it a safe choice. Not suitable if you need audio processing or real-time synthesis—music21 works with symbolic scores, not sound files.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.11 or later.
  • Low friction: pure Python wheel with 8 runtime dependencies (chardet, joblib, jsonpickle, matplotlib, more-itertools, numpy, requests, webcolors).
  • Active maintenance with a commit from 2026-08-12 and a release 58 days prior.

License · maintenance · safety

BSD-3-Clause (permissive) — BSD-3-Clause permissive license. Free to use, modify, and distribute provided you retain the LICENSE file and copyright notice. Externally provided software and encoded musical scores in the corpus may carry separate licenses.

last release 2026-06-17 (58 days) · last repo commit 2026-08-12 · 2,558 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 409,505 downloads/mo, #6,871 on PyPI

Verify before relying

pip install music21

from music21 import converter, stream

# Load and analyze a score
score = converter.parse('path/to/score.musicxml')
for note in score.flatten().notes:
    print(note.pitch, note.quarterLength)
  • Whether matplotlib is required for all use cases or only for visualization features.
  • Whether external music notation software (e.g., MuseScore, Finale) is needed for rendering or playback.
  • Performance characteristics when processing large scores or corpora.
Same gist for agents: .md · .json

What it is and what it does

music21 is a Python library for symbolic music analysis and computational musicology, developed at MIT since 2010. It provides tools to parse, analyze, and manipulate musical scores in formats like MusicXML and MIDI, enabling programmatic access to musical notation, pitch, rhythm, harmony, and other analytical properties. The library is built on standard scientific Python dependencies (numpy, matplotlib, joblib) and supports modern Python versions (3.11+).

Typical workflows involve loading scores from files or URLs, traversing their hierarchical structure to extract notes and measures, performing analytical operations (harmonic analysis, voice leading checks, statistical studies), and generating visualizations or new scores. It's commonly used in music education, research, and computational analysis projects where symbolic representation of music is more relevant than audio processing.

Use it for

  • Analyze harmonic progressions and voice leading in classical scores for music theory research.
  • Extract melodic or rhythmic patterns from a collection of scores for statistical musicology studies.
  • Programmatically generate or modify MusicXML scores based on algorithmic composition rules.
  • Build educational tools that parse student compositions and provide automated feedback on notation or structure.
  • Convert between MIDI and MusicXML formats for integration with other music software workflows.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you work with symbolic music notation, analysis, or computational musicology.

Low install friction, active maintenance, no known vulnerabilities, and permissive licensing make it a safe choice. Not suitable if you need audio processing or real-time synthesis—music21 works with symbolic scores, not sound files.

Install

music21 on PyPI

Before you install

Low friction: pure Python wheel with 8 runtime dependencies (chardet, joblib, jsonpickle, matplotlib, more-itertools, numpy, requests, webcolors). Active maintenance with a commit from 2026-08-12 and a release 58 days prior.

Requires Python 3.11 or later.

License in practice

BSD-3-Clause permissive license. Free to use, modify, and distribute provided you retain the LICENSE file and copyright notice. Externally provided software and encoded musical scores in the corpus may carry separate licenses.

Quickstart

pip install music21

from music21 import converter, stream

# Load and analyze a score
score = converter.parse('path/to/score.musicxml')
for note in score.flatten().notes:
    print(note.pitch, note.quarterLength)

Verify before relying

  • Whether matplotlib is required for all use cases or only for visualization features.
  • Whether external music notation software (e.g., MuseScore, Finale) is needed for rendering or playback.
  • Performance characteristics when processing large scores or corpora.

Package facts

LicenseBSD-3-Clause permissive
Python supportSupports the current Python release >=3.11
Install frictionLow. Pure-Python wheel
Runtime dependencies
8 packages
chardetjoblibjsonpicklematplotlibmore-itertoolsnumpyrequestswebcolors
MaintenanceActively maintained 58 days since the last release
Last repo commit
First released
Downloads409,505 / month, #6,871 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleEnvironment :: Web EnvironmentIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: End Users/DesktopIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Artistic SoftwareTopic :: Multimedia :: Sound/AudioTopic :: Multimedia :: Sound/Audio :: ConversionTopic :: Multimedia :: Sound/Audio :: MIDITopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Evidence: music21-10.5.0-py3-none-any.whl

Tags

Capabilities
music analysis pythonsymbolic music processingmusicology toolkitmidi score analysiscomputational musicmusic notation parsingmusic theory automation
Topics
music-analysissymbolic-notationmusicology

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “music analysis python”

  • music21music21 is a Python toolkit for analyzing, processing, and…
  • librosalibrosa provides audio and music signal processing algorithms and…
  • mir-evalmir_eval computes standard accuracy metrics for music and audio…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also symusic · pretty-midi · mir-eval · aubio · librosa · mido · pylast · basic-pitch · syncedlyrics · music-assistant-models