The Patchbay_

Python Music Libraries Compared

The 49 main Python libraries for making, analyzing, and generating music — what each is actually for, so you pick the right one the first time.

LibraryCategoryLicenseInstallBest for
AbjadComposition & notationGPL-3.0pip install abjadAlgorithmically composing and engraving complex contemporary notation.
ACE-StepML & generativeApache-2.0Clone the repo, pip install -e ., then run: acestepFast, openly-licensed music generation you can build products on.
AmphionML & generativeMITgit clone the repo and build the conda env via env.shResearch and experimentation across speech, singing and audio generation models.
aubioAudio analysisGPL-3.0-or-laterpip install aubioLightweight real-time note-onset, pitch, and tempo detection.
AudioCraft (MusicGen)ML & generativeMITpip install -U audiocraftText-prompted music and sound-effect generation and neural-codec research.
AudioLazySynthesis & DSPGPL-3.0pip install audiolazyLearning and prototyping DSP and stream processing in Python.
BarkML & generativeMITpip install git+https://github.com/suno-ai/bark.gitPrototyping generative speech and sound from text prompts.
Basic PitchAudio analysisApache-2.0pip install basic-pitchConverting monophonic or polyphonic recordings into MIDI for editing or composition.
Bespoke SynthTrackers & modularGPL-3.0-onlyDownload binaries from bespokesynth.com or build from source; Python livecoding is built inModular-synth and livecoding enthusiasts who want to build patches and script them live.
CREPEAudio analysisMITpip install crepePrecise fundamental-frequency tracking of single-voice audio (vocals, solo instruments).
DDSPML & generativeApache-2.0pip install ddspNeural audio synthesis and timbre transfer with interpretable, controllable DSP.
DemucsML & generativeMITpip install demucsHigh-quality offline stem separation for remixing, karaoke, or sampling.
EssentiaAudio analysisAGPL-3.0-onlypip install essentiaComprehensive, production-scale audio feature extraction and music description.
FL Studio MIDI Scripting APIDAW & host scriptingProprietaryBuilt into FL Studio (v20.7+); place a device_*.py script in the scripts folderDevelopers building MIDI hardware-controller integrations for FL Studio.
FoxDotLive codingCC-BY-SA-4.0pip install --user FoxDot (needs SuperCollider)Beginners learning live coding in a familiar Python-like syntax.
FrescobaldiComposition & notationGPL-2.0-or-laterpip install frescobaldi, or use the installers from frescobaldi.orgEngraving publication-quality scores with LilyPond.
isobarComposition & notationMITpip install isobarBuilding generative, pattern-based music and sonification pipelines.
librosaAudio analysisISCpip install librosaMusic information retrieval and audio feature extraction for research and ML.
madmomAudio analysisBSD-2-Clausepip install madmomResearch-grade beat, downbeat, and onset detection with pretrained models.
MagentaML & generativeApache-2.0pip install magentaLearning classic deep-learning approaches to symbolic music generation and reusing pretrained models.
MIDIUtilMIDI toolsMITpip install MIDIUtilSimple, dependency-free generation of MIDI files from code.
MidoMIDI toolsMITpip install midoReading, writing, and sending/receiving raw MIDI messages and files.
mingusComposition & notationGPL-3.0pip install mingusExploring and computing Western music theory in Python.
music21Composition & notationBSD-3-Clausepip install music21Analyzing and manipulating symbolic scores and computational-musicology research.
MusPyComposition & notationMITpip install muspyPreparing and converting symbolic music datasets for machine-learning research.
note-seqML & generativeApache-2.0pip install note-seqRepresenting and converting symbolic music data in ML generative pipelines.
PartituraComposition & notationApache-2.0pip install partituraResearch pipelines that parse and analyze symbolic music across formats.
PedalboardSynthesis & DSPGPL-3.0pip install pedalboardBatch audio processing, applying effects, and hosting VST/AU plugins from Python.
pretty_midiMIDI toolsMITpip install pretty_midiMIR/ML preprocessing: extracting features and piano rolls from MIDI files.
pydubSynthesis & DSPMITpip install pydubQuick, scripted audio-file editing and format conversion.
pyFluidSynthMIDI toolsLGPL-2.1-or-laterpip install pyfluidsynthProgrammatically playing MIDI/notes through SoundFont software synthesis.
pyoSynthesis & DSPLGPL-3.0pip install pyoWriting real-time synthesis and DSP patches directly in Python.
python-rtmidiMIDI toolsMITpip install python-rtmidiSending and receiving real-time MIDI messages to hardware or software ports.
python-sounddeviceSynthesis & DSPMITpip install sounddeviceRecording and playback of audio in Python scripts and realtime callback pipelines.
RAVEML & generativeCC-BY-NC-4.0pip install acids-raveLive/real-time timbre transfer and generative audio inside DAWs and Max/PD.
ReaScriptDAW & host scriptingProprietaryBuilt into REAPER (Lua/EEL2 embedded); Python must be installed separately and enabledREAPER users automating workflows or building custom tools and extensions.
RenardoLive codingGPL-3.0pip install renardoLive-coding performances and algorithmic music using FoxDot-style Python syntax.
RiffusionML & generativeMITClone the riffusion repo, or use the web appExperimenting with spectrogram-based generation, or quick song sketches on the web.
SardineLive codingGPL-3.0pip install sardine-systemPython programmers who want to live code with MIDI/OSC/SuperCollider.
SCAMPComposition & notationGPL-3.0pip install scampComposers who want to script music and get both audio playback and notation.
SoundFileSynthesis & DSPBSD-3-Clausepip install soundfileLoading and saving audio files as NumPy data in analysis and DSP pipelines.
SpleeterML & generativeMITpip install spleeterFast batch stem separation when speed matters more than peak quality.
Stable Audio OpenML & generativeMITpip install diffusers transformers torch soundfileGenerating instrumental loops and sound effects locally with open weights.
SupriyaSynthesis & DSPMITpip install supriyaDriving SuperCollider synthesis and sequencing from Python, including offline rendering.
thebeatAudio analysisGPL-3.0pip install thebeatCognitive/behavioral timing and rhythm-perception experiments.
torchaudioAudio analysisBSD-2-Clausepip install torchaudioAudio feature extraction and dataset/transform pipelines within PyTorch ML.
TroopLive codingSee projectDownload a release or run the server/client scripts; requires a backend languageSmall groups wanting to co-edit live-coding sessions, especially FoxDot ensembles.
VortexLive codingGPL-3.0pip install -U tidalvortex (needs Python 3.11+, liblo, Qt 6)Python users wanting TidalCycles-style algorithmic patterns without Haskell.
YuEML & generativeApache-2.0Clone the repo and run the inference scriptsSelf-hosting open full-song generation with vocals from your own lyrics.

← Back to all tools