# craffel/pretty-midi

Utility functions for handling MIDI data in a nice/intuitive way.

Repository: https://github.com/craffel/pretty-midi
Canonical: https://ross.abutalabs.com/products/pretty-midi
Language: Jupyter Notebook
License: MIT
License Family: permissive
Last push: 2026-02-18T16:33:36+00:00

## Health v2 (maintenance only)
Score: 57/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 68, release rhythm 19, longevity 100
- inputs: {"age_days": 4780, "days_push": 196, "days_rel": 329, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1034, forks 169 (observed 2026-08-28T04:03:18.886589+00:00)

## What it is
A Python library providing utility functions and classes for conveniently handling, analyzing, creating, and manipulating MIDI data. It supports loading MIDI files, extracting musical features like tempo and chroma, editing notes, and synthesizing audio.

## Use cases
- parse midi files in python
- analyze tempo and key of a midi song
- programmatically create midi files
- convert midi notes to audio
- extract features from midi for music machine learning
- transpose notes in a midi track

## When to choose
- you need an intuitive Python API for reading, writing, or editing MIDI data
- you're doing music information retrieval research or feature extraction from MIDI
- you want to synthesize MIDI to audio within Python

## When to avoid
- you need real-time MIDI playback or live performance features
- you're working with audio files rather than MIDI data
- you need a full-featured digital audio workstation

## Facets
- artifact type: library
- maturity: maintenance
- function: audio-processing, parser, data-science
- domain: audio, machine-learning, data-science
- platform: python, cross-platform
- tags: midi, music-information-retrieval, audio-synthesis, music-notation, audio

## Member repositories
- craffel/pretty-midi (main) score 57

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:18.886589+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:06:32.458821+00:00, confidence not recorded.
  - readme: https://github.com/craffel/pretty-midi (fetched 2026-08-28T04:03:18.886589+00:00, sha c0eaa1c099e9)
  - registry_pypi: https://pypi.org/pypi/pretty-midi/json (fetched 2026-08-29T13:06:12.706970+00:00, sha 4f4274dfd941)
- Data as of 2026-08-30T08:39:29.467469+00:00.
