Drums alone
Before the key, it asks whether there are any notes. In each long slice it takes the peaks at 80 Hz and up, and keeps the share of their energy that was already there, at the same pitch, in the three slices before (140 ms). Notes ring on and drum hits die away: on the backline songs a drum kit keeps under 16%, a bass line alone 24% or more, a band 30% or more. Under 19% it hears drums only, so it looks for no key or chords, and finds the bars from the kick alone. A phone's mic hears no kick, which leaves a kit's snare and toms more of the share, so the same share is also taken from 250 Hz up, where a kit keeps under half on any mic and a band three quarters or more. One voice that is clear most of the time is never drums: a singer's vibrato moves its peaks too far from slice to slice to count as held. Hiss holds nothing either, so drums also need a steady pulse or hits that stand out. Without them it hears only noise or hum, and reads no key, chords or notes. One pitch under C2 that never moves or starts again is hum too (mains hum is 50 or 60 Hz), not one voice.
Then it writes the drums out. First the swing, from the rises above 2 kHz, where hats and snares are: in each beat, where the strongest hit between the beats lands. If a quarter of the beats have a hit a quarter of the way in, the sixteenths swing; if not, the eighths. Then each sixteenth gets how much every band rose over that band's own noise, and how much of that still rang 40 to 70 ms later (a snare's wires ring, a kick's click doesn't). Three shapes, kick low, snare in the middle and hats on top, are fitted to every sixteenth at once by non-negative matrix factorization, each free to settle on this kit's own sound. From drums alone, beats 1 and 3 often sound the same. Then the fills and pickups decide, since they lead into beat 1.
sustainSummary() drumHits() drumDownbeat() drumFold()
On the page: "Heard as" above the readings, and the drum grid and swing in the drums card. If it heard wrong, pick what it is, and it reads the take again.