symusic
A high performance MIDI file parser with comprehensible interface.
What it is and what it does
symusic is a symbolic music toolkit that loads and manipulates MIDI and ABC files at the note level, with a C++20 core exposed to Python via nanobind. It handles common music information retrieval tasks—parsing, time-unit conversion, beat/downbeat computation, piano roll generation, and vectorized transformations—much faster than pure-Python alternatives. The package also includes audio synthesis via SoundFonts and efficient serialization through pickle and NumPy exports.
You use it when you need to work with symbolic music data in research or production pipelines: load a MIDI file, apply transformations like transposition or velocity shifts, compute analysis features, and export the result. It targets music information retrieval (MIR) workflows where speed and a clean note-level API matter more than GUI-based editing.
Use it for:
- Parse large MIDI datasets for MIR model training without the speed penalty of pure-Python libraries
- Transpose, filter, or resample note sequences programmatically for data augmentation
- Compute piano rolls and beat grids from MIDI for feature extraction in music analysis
- Render MIDI to audio using built-in SoundFont synthesis for listening and validation
- Convert between MIDI and ABC formats while preserving note-level structure
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
symusic parses and transforms MIDI and ABC files at note level with C++20-backed speed, exposing vectorized operations like pitch/velocity/time shifts and audio rendering through SoundFonts.
Yes, if you work with symbolic music data and need fast, note-level MIDI/ABC parsing and transformation. The C++20 backend, active maintenance, MIT license, and zero known vulnerabilities make it a solid choice. Install friction is moderate (compiled dependencies) but pre-built wheels cover most platforms. The Alpha status means the API may shift, so pin the version in production.
Install
symusic on PyPI
pip
pip install symusicuv
uv add symusicpoetry
poetry add symusicInstalling symusic
Before you install
Medium install friction due to compiled C++20 dependencies, but pre-built wheels cover Python 3.9–3.14 across Linux, macOS, and Windows including arm64. Active maintenance with recent commits and no known vulnerabilities.
License in practice
MIT License permits commercial and private use with minimal restrictions; you may use, modify, and distribute symusic freely provided you retain the license notice.
Quickstart
pip install symusic
from symusic import Score
score = Score("example.mid")
score.shift_pitch(12) # transpose up one octave
score.dump_midi("transposed.mid")
Requires a C++20-capable compiler and CMake if building from source; pre-built wheels available for most platforms.
Verify before relying
- Exact performance multiplier ('hundreds of times faster') compared to pure-Python MIDI libraries in typical workflows
- Whether PyPy wheels for pp311 are actively maintained or tested alongside CPython releases
- Stability guarantees for the Alpha (Development Status 3) release in production pipelines
Package facts
| License | MIT License Copyright (c) 2023 廖奕凯 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 3 — numpy, pySmartDL, platformdirs |
| Maintenance | actively maintained — 128 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 99,479/month — #13,018 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: symusic-0.6.0-cp310-cp310-macosx_11_0_arm64.whl; symusic-0.6.0-cp310-cp310-macosx_11_0_x86_64.whl; symusic-0.6.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; symusic-0.6.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; symusic-0.6.0-cp310-cp310-musllinux_1_2_aarch64.whl; symusic-0.6.0-cp310-cp310-musllinux_1_2_x86_64.whl; symusic-0.6.0-cp310-cp310-win32.whl; symusic-0.6.0-cp310-cp310-win_amd64.whl; symusic-0.6.0-cp310-cp310-win_arm64.whl; symusic-0.6.0-cp311-cp311-macosx_11_0_arm64.whl; symusic-0.6.0-cp311-cp311-macosx_11_0_x86_64.whl; symusic-0.6.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; symusic-0.6.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; symusic-0.6.0-cp311-cp311-musllinux_1_2_aarch64.whl; symusic-0.6.0-cp311-cp311-musllinux_1_2_x86_64.whl; symusic-0.6.0-cp311-cp311-win32.whl; symusic-0.6.0-cp311-cp311-win_amd64.whl; symusic-0.6.0-cp311-cp311-win_arm64.whl; symusic-0.6.0-cp312-cp312-macosx_11_0_arm64.whl; symusic-0.6.0-cp312-cp312-macosx_11_0_x86_64.whl
Keywords: midi, music, mir
Tags
More File Formats packages
msgpack serializes and deserializes Python…
permissive · top 1,000 on PyPI
pyelftoolspyelftools parses and analyzes ELF binary files…
permissive · top 5,000 on PyPI
python-oxmsgParses Outlook MSG files to extract email…
permissive · top 5,000 on PyPI
stringzillaStringZilla provides SIMD and SWAR-accelerated…
permissive · top 5,000 on PyPI
borbborb reads, writes, and manipulates PDF files…
agpl · top 15,000 on PyPI
protobuf-pyGenerates well-typed, readable Python code from…
permissive · top 15,000 on PyPI
music21music21 is a Python toolkit for analyzing,…
permissive · top 15,000 on PyPI
pretty-midiProvides utilities for reading, modifying, and…
permissive · top 15,000 on PyPI
midoMido provides a Python library for creating,…
permissive · top 5,000 on PyPI
librosalibrosa provides audio and music signal…
permissive · top 5,000 on PyPI
basic-pitchBasic Pitch converts audio files to MIDI…
unclear · top 15,000 on PyPI
aubioaubio is a Python wrapper around a C library…
copyleft · top 15,000 on PyPI
python-stretchPitch-shifts and time-stretches audio using the…
permissive · top 15,000 on PyPI
music-assistant-modelsProvides shared data models for Music…
permissive · top 15,000 on PyPI
python-rtmidipython-rtmidi provides a Python interface to…
permissive · top 15,000 on PyPI
syncedlyricsFetches synchronized lyrics in LRC format for…
permissive · top 15,000 on PyPI