← all repositories
samim23/polymath

The Crate-Digger’s ML Pipeline: From MP3s to Stems and MIDI

Polymath exists to turn a chaotic pile of audio files into a structured, tempo-locked sample library without manual chopping or key detection.

1.6k stars Python Other AIData Tooling
polymath
Not currently ranked — collecting fresh signals.
star history

What it does Polymath ingests audio from local files or YouTube and runs it through a pipeline of existing ML models. It separates tracks into stems like bass and drums, detects key and structure, quantizes everything to a shared beat grid, and spits out a searchable library. The output is meant to drop straight into a DAW or feed into a generative model training run.

The interesting bit Rather than training its own models, it acts as a disciplined stage manager for Demucs, Crepe, Basic Pitch, and others—gluing them together so producers and ML developers don’t have to wrangle six separate tools just to isolate a breakbeat or build a dataset. The payoff is bulk automation: point it at a folder and it returns stems, MIDI, and metadata in a uniform format.

Key highlights

  • Stems out six parts (bass, drums, guitar, piano, vocals, other) via Demucs.
  • Quantizes and beat-locks tracks to a common tempo using pyrubberband.
  • Detects musical structure (verse, chorus), key, pitch, timbre, and loudness.
  • Converts audio to MIDI with Spotify’s Basic Pitch model.
  • Searches for similar tracks across the library to help build mixes or datasets.

Caveats

  • Generated MIDI files are hard-locked to 120 BPM for now and need manual timing adjustments in your DAW.
  • The audio-to-MIDI model struggles with drums and percussion, so don’t expect clean kit transcriptions yet.
  • Docker GPU support is listed as “forthcoming,” so native installs are the only path for CUDA acceleration today.

Verdict Worth a look if you are a producer, DJ, or ML audio researcher sitting on a mountain of unorganized audio. Skip it if you need a polished, end-to-end DAW plugin or flawless MIDI transcription today.

Frequently asked

What is samim23/polymath?
Polymath exists to turn a chaotic pile of audio files into a structured, tempo-locked sample library without manual chopping or key detection.
Is polymath open source?
Yes — samim23/polymath is open source, released under the MIT license.
What language is polymath written in?
samim23/polymath is primarily written in Python.
How popular is polymath?
samim23/polymath has 1.6k stars on GitHub.
Where can I find polymath?
samim23/polymath is on GitHub at https://github.com/samim23/polymath.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.