$npx skillfedfor your agent

pretty-midi

Functions and classes for handling MIDI data conveniently.

Worth itPyPI Sound/AudioReleased Jul 2026255.6K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pretty_midi-0.2.11.post0-py3-none-any.whl
v0.2.11.post0 · released 2026-07-28 · 4 runtime deps: numpy, mido, six, importlib_resources

Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and fills a clear niche in MIDI manipulation. It is well-suited for music information retrieval, composition automation, and MIDI editing workflows. No known vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Synthesize requires fluidsynth program and pyfluidsynth package installed separately; basic MIDI parsing and manipulation work without them.
  • Low friction install with four straightforward dependencies.
  • Actively maintained with a recent release and steady commit history.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open and closed projects.

last release 2026-07-28 (17 days) · last repo commit 2026-02-18 · 1,035 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 255,627 downloads/mo, #8,475 on PyPI

Verify before relying

import pretty_midi
midi_data = pretty_midi.PrettyMIDI('example.mid')
print(midi_data.estimate_tempo())
audio_data = midi_data.synthesize()
  • Whether synthesize() output format and sample rate are documented or configurable
  • Performance characteristics with large MIDI files or many instruments
  • Python version compatibility (requires_python not specified in metadata)
Same gist for agents: .md · .json

What it is and what it does

pretty_midi wraps MIDI file handling in Python objects that expose notes, instruments, and timing as directly modifiable attributes rather than raw binary data. It lets you load a MIDI file, inspect its tempo and harmonic content, shift pitches, add or remove notes, and write the result back to disk or synthesize it to audio. The library depends on numpy for numerical operations, mido for MIDI I/O, six for Python 2/3 compatibility, and importlib_resources for resource loading.

The package is designed for music information retrieval and composition workflows—analyzing existing MIDI files to extract features like key or tempo, programmatically creating MIDI from scratch by building instruments and note objects, or transforming MIDI data by iterating over its structure. Audio synthesis is optional and requires external dependencies (fluidsynth and pyfluidsynth).

Use it for

  • Analyze MIDI files to extract tempo, key, or note statistics for music research
  • Programmatically generate MIDI files by creating instruments and adding notes with specific pitches and timings
  • Transpose or shift all notes in a MIDI file by a fixed interval
  • Extract individual instrument tracks or filter notes by criteria for remixing
  • Synthesize MIDI to audio waveforms for playback or further processing

Worth the install?

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

Worth it

Yes.

The package is actively maintained, has low install friction, carries a permissive MIT license, and fills a clear niche in MIDI manipulation. It is well-suited for music information retrieval, composition automation, and MIDI editing workflows. No known vulnerabilities.

Install

pretty-midi on PyPI

Before you install

Low friction install with four straightforward dependencies. Actively maintained with a recent release and steady commit history.

Synthesize requires fluidsynth program and pyfluidsynth package installed separately; basic MIDI parsing and manipulation work without them.

License in practice

MIT license permits unrestricted use, modification, and distribution in both open and closed projects.

Quickstart

import pretty_midi
midi_data = pretty_midi.PrettyMIDI('example.mid')
print(midi_data.estimate_tempo())
audio_data = midi_data.synthesize()

Verify before relying

  • Whether synthesize() output format and sample rate are documented or configurable
  • Performance characteristics with large MIDI files or many instruments
  • Python version compatibility (requires_python not specified in metadata)

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
4 packages
numpymidosiximportlib_resources
MaintenanceActively maintained 17 days since the last release
Last repo commit
First released
Downloads255,627 / month, #8,475 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonTopic :: Multimedia :: Sound/Audio :: MIDI

Evidence: pretty_midi-0.2.11.post0-py3-none-any.whl

Tags

Capabilities
midi file parsing pythonmidi note manipulationmusic information retrievalmidi synthesis audiomidi tempo analysismidi chord creationmidi data extraction
Topics
music-information-retrievalmidi-synthesis
PyPI keywords
audiomusicmidimir

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 › “midi file parsing python”

  • pretty-midiProvides utilities for reading, modifying, and synthesizing MIDI data…
  • symusicsymusic parses and transforms MIDI and ABC files at note level with…
  • midoMido provides a Python library for creating, parsing, and sending…

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

More Sound/Audio packages

soundfile Worth it
PyPI · Sound/Audio · released Jun 2026

Reads and writes audio files in formats like WAV, FLAC, OGG, and MAT through libsndfile, exposing audio data as NumPy arrays.

BSD-3-Clausepure Python · 3.10+
30.0Mdownloads / mo
pydub With conditions
PyPI · Libraries · released Mar 2021

Pydub provides a high-level Python interface for loading, manipulating, and exporting audio files with simple operations like slicing, concatenation, and format conversion.

However, the abandoned status since 2021-03-10 means no future fixes or compatibility updates—use it only if you can tolerate potential issues with newer Python…

MITpure Pythonabandoned
21.0Mdownloads / mo
mutagen Worth it
PyPI · Sound/Audio · released Jun 2026

Mutagen reads and writes audio metadata (tags) across many audio formats including MP3, FLAC, OGG, MP4, WavPack, and others, supporting ID3v2 and APEv2 tag editing.

Install it if you need to read or edit audio tags programmatically.

GPL-2.0-or-laterpure Python
15.0Mdownloads / mo
torchaudio With conditions
PyPI · Artificial Intelligence · released Mar 2026

Provides PyTorch-based audio processing, transforms, and dataloaders for machine learning tasks, with GPU acceleration and autograd support for trainable audio features.

BSD-3-Clausecompiled wheel
12.3Mdownloads / mo
moviepy With conditions
PyPI · Multimedia · released May 2025

MoviePy is a Python library for video editing that reads, processes, and writes video and audio files by converting them to numpy arrays for frame-level manipulation and effect application.

MITpure Pythonaging
8.2Mdownloads / mo
tinytag Worth it
PyPI · WWW/HTTP · released Jul 2026

Reads metadata (artist, title, duration, bitrate, and more) from audio files in formats including MP3, MP4, FLAC, OGG, WAV, and others, without writing or modifying tags.

Install it if you need to extract metadata from audio files without the overhead of a heavier library.

MITpure Python · 3.7+
5.5Mdownloads / mo

See also symusic · music21 · librosa · mido · basic-pitch · python-stretch · pyrubberband · syncedlyrics · mir-eval · python-rtmidi