Skip to content
trak3rPublic

About

Local drum transcription: Demucs → ADTOF → MusicXML → MuseScore (PDF/mscz)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

rudiment

Local drum transcription pipeline: isolate drums, transcribe to MIDI, engrave readable sheet music.

full mix → Demucs (drums) → ADTOF (MIDI) → MusicXML (4/4, rests) → MuseScore (PDF / .mscz)

Goal

Transcribe the drums from Chuck Mangione’s Feels So Good into practice sheet music — kick, snare, hats, toms, cymbals — with readable rests and correct meter, then hand-edit ride bell / detail in MuseScore.

Feels So Good — Chuck Mangione

All tools in the pipeline are free/open source.

Why this stack

Step Tool Role
Stem split Demucs htdemucs Isolate drums.wav from a full mix
Transcription ADTOF-pytorch Kick, snare, hats, toms, cymbals → MIDI
Notation scripts/transcribe.py Force meter/tempo; whole rests + empty bars for MuseScore multimeasure rests
Engraving MuseScore Studio 4 PDF + .mscz (edit by hand)

MuseScore is not fed raw MIDI for layout — its MIDI importer often guesses the wrong time signature and tempo. We write MusicXML, apply styles/drum.mss, build .mscz (so multimeasure rests resolve), then export PDF.

Setup

Requires Python 3.9–3.12 (3.12 recommended), uv, and MuseScore’s mscore CLI.

brew install --cask musescore
brew install ffmpeg   # if you use mp3/etc.

cd rudiment
uv venv --python 3.12 .venv
source .venv/bin/activate
uv pip install demucs torch torchaudio librosa pretty_midi
uv pip install --no-deps "git+https://github.com/xavriley/ADTOF-pytorch.git"

Usage

Drum stem already available:

source .venv/bin/activate
python scripts/transcribe.py path/to/drums.wav \
  --name my_song --tempo 103 --device cpu

Full mix (Demucs first):

python scripts/transcribe.py path/to/song.wav --full-song \
  --name my_song --tempo 103 --device cpu

Re-engrave only (reuse existing outputs/<name>_adtof.mid):

python scripts/transcribe.py path/to/drums.wav \
  --name my_song --tempo 103 --skip-adtof

Outputs (outputs/)

File Purpose
*_adtof.mid ADTOF MIDI
*.musicxml Interchange / debugging
*.mscz Open in MuseScore for hand edits
*.pdf Printable chart

Audio, stems, and outputs are gitignored (keep copyrighted material local).

Limitations

  • ADTOF is 5-class: kick / snare / hi-hat / toms / cymbals — no ride vs crash split, no ride bell or cross-stick (edit those in MuseScore).
  • Soft jazz/funk grooves still need human cleanup.
  • On macOS, NumPy/PyTorch can SIGSEGV under sandboxed shells; the script caps BLAS threads. Run transcription unsandboxed locally.

License

Pipeline scripts in this repo are for personal practice use. Upstream tools: Demucs (MIT), ADTOF-pytorch (OSS), MuseScore Studio (GPLv3).

About

Local drum transcription: Demucs → ADTOF → MusicXML → MuseScore (PDF/mscz)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages