Drum Extractor

Drop in a song and get the drums on their own, at half speed if you need it, with the sheet music following along.

Drum Extractor looping the drum fill in the demo riff at 70% speed, with A and B lit and the loop running from 0:06 to 0:08. Under the controls, a strip marks the drum hits the transcriber found, in lanes for kick, snare, toms, hi-hats and cymbals. Below it is the drum sheet music the app wrote out from the hits the riff’s script played, with bar 4, the fill, lit in purple

The numbers

4stems (separate parts) each song is split into
50%speed without changing the pitch
PDF, MIDI, GP5export formats (PDF needs MuseScore, MIDI is the note-⁠by-⁠note format music software reads, and GP5 is Guitar Pro’s format)

Clips

The progress screen goes through each step the app reports, in order, and then the mixer opens. This is a replay at double speed over results that were already finished, so no song is being split here. The demo riff was made as separate parts with no singing, so there’s no fader for vocals.
The bar that’s playing lights up on the sheet music. This chart is the one the app wrote out from the hits the riff’s script played.

Why I built it

To learn a song on drums, I need to hear the kit on its own, slow down the hard part, loop one fill until I’ve got it, and read a chart. I was using four different tools for that, so I built one.

What it does

Demucs is an open-source model from Meta’s research lab that splits a song into drums, bass, vocals and everything else. Each part gets a fader on the mixer, with mute and solo. Above the seek bar, a strip marks every drum hit the app found, with kick, snare, hi-hat, toms and cymbals each in its own lane. The space bar plays and pauses, so I can start the song without putting my sticks down. The app transcribes the drum part to MIDI and writes it out as sheet music.

Sheet music for the demo riff’s drums at 117 beats per minute, in two lines of four bars. Bars 1 to 3 have eighth notes on the hi-hat, accented snares on beats 2 and 4, and a kick pattern under them. Bar 4 is the fill, with accented snares on beats 2, 3 and 4 and quick kicks between them. Bars 5 to 8 repeat the beat with a crash cymbal in place of the hi-hatThe same eight bars as the drum transcription model wrote them from the audio. Bar 1 opens with a rest where the first kick and hi-hat should be. Most snares in bars 1 to 3 sit on the tom line, bar 4 keeps its three snares but loses the quick kicks, and bars 5 to 8 have extra kicks, with every crash but one written as hi-hat
Top, the demo riff’s drums as the app writes them out from the hits my script played, which is what a perfect transcription would look like. Bottom, the same audio run through ADTOF, an open-source drum transcription model, and written out the same way with no edits. It misses the first beat, hears most of the early snares as a tom, drops the quick kicks in the fill and writes almost every crash as a hi-hat. On a real song the app writes out the model’s version, so I treat that chart as a first draft.

Bass gets a tab too, and so does guitar if you check the guitar box when you drop the song in.

The bass tab for the demo riff as plain text. A first line gives the tuning, E, A, D and G from low to high, and a tempo of about 117 beats per minute. Under it are two lines of tab with the same pattern twice in each: three notes on the 1st fret of the E string, three on the 1st fret of the A string, then three on the 4th fret of each
The bass tab the app wrote for the demo riff, with no edits. All 48 notes are there. The text version spaces them evenly, and the Guitar Pro file it saves keeps their rhythm.

What I decided

  • Everything runs locally. Your audio never leaves your computer, and there’s no account.
  • Transcribe to MIDI first, then make the chart. You can edit a MIDI file in other music software and turn it into sheet music again.
  • Score the transcriber automatically. On every push to the main branch, GitHub builds a set of synthesized grooves with known hits and scores the app’s fallback drum transcriber on them, the one it uses when ADTOF isn’t installed. The build fails if its F-measure, a score from 0 to 1 that goes down with every hit it misses or makes up, drops below 0.65. It scores 0.73 on the whole set.
  • Write down the limits. Heavily distorted rhythm guitar is the hardest thing the pipeline has to transcribe, so the project’s GitHub page tells you to treat those tabs as a rough draft. The drum chart is a draft too, as the second chart above shows.
  • Ship a demo with no copyrighted recording in it. A script synthesizes its four-chord riff, so anyone can run the whole pipeline.

Try it

The install steps are on GitHub. There’s a one-line install for macOS and Linux and a double-click installer for Windows. Without a graphics card, splitting a song takes about as long as the song itself.

Mix a loop

Here’s a small copy of the app’s mixer playing a made-up loop, so you can solo the drums or slow it to half speed.

The drum chart: four bars of eighth notes. The hi-hat plays every eighth note, the snare plays beats 2 and 4, and the kick plays beats 1 and 3, with an extra kick in bars 2 and 3. In bar 4 the hi-hat stops after beat 3 and the snare fills to the end of the bar.

Bar 1 of 4

Speed
Drums
Bass

It’s a toy: the loop is made up, and your browser synthesizes it as it plays. In the app, you mix the parts it split out of a real song, and the chart that lights up is the one it wrote from that song’s drums.