Control panelSame model output, different decoding: turn a knob (drag, scroll or arrow keys; double-click resets it) and the notes are made again. Press a decoder's round button to use it.
Livestreaming HMM
Originalmelodia trick
Mixsong ↔ notes
How to use
Everything runs in your browser. Audio never leaves your machine.
Open a file
Click the search bar at the top left (“Open or drop an audio file…”), drop a file anywhere on the page, or
press Try an example (vocadito track 10, a sung melody). Mic transcribes from your microphone as you
play or sing; notes trail the sound by about 2 seconds, since the model listens in 2-second windows. Press
Stop and the recording becomes a file you can play back, re-decode or download as MIDI. WAV, MP3, AAC, FLAC and Ogg work, depending on what your browser can decode.
Live or Original
Live makes notes with a streaming decoder (a hidden Markov model, see the report)
while the model runs, so notes appear as soon as each one is final. Original uses Basic Pitch's own note
creation, exactly as the basic-pitch package does it with its default settings. That method finds
onset peaks across the file and then uses the melodia trick: it repeatedly takes the strongest leftover
activation anywhere in the file and traces it forwards and backwards in time into a note
(“Posteriorgram post-processing”, section 3 of the Basic Pitch paper;
the name comes from Melodia, a melody extractor that
builds pitch contours the same way; code).
It needs the whole file, so its notes come at the end. Switching modes keeps the music playing.
Control panel
Control panel opens a panel with one unit per decoder. Its knobs are the decoder's settings: turn one
(drag up or down, scroll, or use the arrow keys; shift for fine steps; double-click to reset it)
and the notes are made again from the same model output, usually in a few milliseconds, without running the
model. Press a unit's round button to use that decoder; its light comes on. Changed knobs show their values in yellow, and
reset puts a unit back to its defaults. Settings are remembered in this browser. Results made with
changed settings aren't saved.
Move around
Drag, or scroll sideways
Pan
Pinch, ctrl+scroll, or scroll
Zoom around the pointer
Double-click (shift to zoom out)
Zoom in
0, or the fit button at the bottom right
Show the whole file
The + and − buttons
Zoom
←→ · +−
Pan · zoom
Whatever is on screen is transcribed first. Shaded stretches aren't transcribed yet. Layers (bottom
left) shows or hides the model's output before decoding (the orange heat map), the notes, and their pitch bends:
the line through a note follows its pitch frame by frame, from the model's contour output, the way
basic-pitch computes bends.
Listen
space or the play button
Play or pause
Click or drag along the time axis under the roll
Jump there, or scrub
Click empty space on the roll
Jump there
tab to the time axis, then ←→ (shift for 1 s) · page uppage down · homeend
Step 5 s · 30 s · go to the start or end
Pan while playing
Stop following the playhead (the playhead button at the bottom right brings it back)
Song · Notes · Both
Hear the original, the transcribed notes on a simple synth, or the notes over the song to compare. The Mix knob in the control panel sets anything in between.
While playing, the view scrolls so the playhead stays a quarter of the way in, leaving most of the screen for
what's coming. Notes under the playhead turn green and their keys light up on the keyboard at the left.
Notes
Hover a note for its name, MIDI number, frequency, timing and how far it bends. Click to pin it; esc or a click
elsewhere clears it. In Live mode the tooltip also shows the decoder lag: how long after the note began the
decoder was sure of its start.
Save
The download button in the search bar writes the notes the way basic-pitch does (120 bpm, Electric Piano 1,
velocity from how strong the note is, and pitch bends except on notes that overlap another, since one MIDI
channel bends every note at once). Finished results are kept in this browser, per file
and mode, so reopening a file is instant; the circular arrow next to it transcribes again. Saved results:
.
Streaming Basic Pitch
How to get notes out of Basic Pitch while the audio comes in, what the numbers said, and why the
site works the way it does. November 2026.
The problem
The Basic Pitch model already runs window by window, so it can stream. The note creation step after it can't:
it finds onset peaks across the file, and the melodia
trick repeatedly takes the strongest leftover activation anywhere in the file. So notes only exist once the
whole file is in. The goal was notes as the audio arrives, without retraining Basic Pitch.
The options
All of them read the same Basic Pitch outputs; only the step that turns those into notes differs. The names
match the charts and tables below.
Original, default. Basic Pitch's own note creation with predict()'s defaults, melodia
trick on. Needs the whole file. This is the site's Original mode.
Original, tuned (the bar). The same code with its thresholds tuned on each dataset's dev half. Needs
the whole file. Every other option is scored against it, track by track.
Live: streaming HMM. A hidden Markov model for each pitch, decoded as the audio comes in, with its
starting parameters. This is the site's Live mode, explained below.
HMM tuned per dataset. The same decoder with its parameters tuned on each dataset's dev half, which
adds about 100 ms of delay.
Learned decoder. A small recurrent network (an RNN) that reads all 88 pitches at once, with 4 frames
(46 ms) of look-ahead. Details further down.
From a traceback length to an HMM
The starting idea was to treat note creation like a Viterbi decoder with a fixed traceback length, the way streaming
decoders for error-correcting codes work: keep the best explanation of the audio so far for every possible
current state, and once the explanations agree about a frame, or after a fixed delay at the latest, commit to it.
A short look through the literature showed that this generalizes to a hidden Markov model decoded with the
Viterbi algorithm, run online, where a decision is final as
soon as all surviving paths merge (Šrámek et al.) and
the traceback length becomes a cap on how long a decision can wait. HMMs with attack and sustain states are also
an established way to turn frame-by-frame pitch estimates into notes
(Ryynänen & Klapuri,
Poliner & Ellis).
What an HMM is
A hidden Markov model describes something you can't observe directly as a chain of states. Here, for each of
the 88 piano pitches, the hidden state in each frame (11.6 ms) says whether that pitch is off, in the first few
frames of a note (attack), held (sustain), or in a short dip inside a note (gap). The model says two things:
how likely each move from one state to the next is, and how well each state explains what Basic Pitch reports for
that frame (its note and onset activations). The Viterbi algorithm finds the single most likely sequence of states;
each run from attack through sustain is a note.
One pitch's states. Green states are “note on”. Each state can also stay where it is for another frame.
The chain is what makes it better than a threshold: a flicker in the activation can't make a new note unless an
onset (or very strong evidence) starts one, and a short dip inside a held note stays one note.
Running it as the audio arrives: at each new frame, Viterbi keeps one best path into each state. Followed
back, those paths usually join within a few frames; everything before the join can't change any more, so it's
final. That is the decoder lag shown in the note tooltips. If they haven't joined after 100 frames (1.16 s), the
decoder commits to the best path anyway. That cap is the original traceback length.
Tuning
A fair baseline. The original note creation was tuned too (per dataset, on the dev halves). Tuned, it
gains a lot: onset threshold 0.625, frame threshold 0.3, minimum length 7, energy tolerance 4, and the melodia
trick off.
Tuning the HMM. Hill climbing gave all the gains. A PufferLib Protein sweep with latency as the cost
never beat the starting parameters at the same latency. Per-register parameters didn't carry over from dev to
test, and stronger re-strike handling made things worse.
A ceiling check. The HMM tuned directly on the vocadito test tracks, to see how good any HMM tuning
could get.
Results
Test halves of GuitarSet (guitar), MAESTRO (piano) and vocadito (singing). F is mir_eval's note F-measure with
offsets; Fno ignores offsets. A decoder “beats” the tuned original on a track when it scores strictly higher.
The onset delay is the median time from a note's start until the decoder has committed to it.
Slakh2100 (multi-instrument mixes rendered from MIDI) isn't
included: it comes as a single 104 GB archive, too big to download and unpack for this round.
Share of test tracks where each decoder beats the tuned original
The goal was 95%. Hover a bar for the scores behind it.
All results, by dataset
Mean scores over each dataset's test tracks. “Tracks beaten” is the share of test tracks on which the
decoder scored higher than the tuned original did on that same track; a tie doesn't count.
Track by track: decoder score minus the tuned original's
Each column is one test track. Hover for its name and scores.
The vocadito sweep was then redone with the share of tracks won as the objective, against a re-tuned original,
along with a ceiling check: the same sweep, tuned and scored on the test tracks themselves.
Streaming HMM, scored on the 20 vocadito test tracks
Fno (onsets)
F (with offsets)
Tracks beaten on Fno
Tracks beaten on F
Onset delay (median)
Original, re-tuned on dev (the bar)
.563
.387
–
–
whole file
Tuned on dev, ~0 ms budget
.555
.410
30%
60%
12 ms
Tuned on dev, ~50 ms budget
.578
.429
60%
85%
46 ms
Tuned on dev, ~100 ms budget
.580
.429
65%
75%
70 ms
Tuned on the test tracks themselves (ceiling)
.584
.443
80%
85%
104 ms
Every HMM setting tried on vocadito
686 settings from the two sweeps. More delay barely helps past about 50 ms. Scored on the test
tracks, no setting reaches 95%, not even ones tuned on those tracks. Hover a dot for its scores.
The RNN option
Why it was attractive. The HMM looks at each pitch on its own, so it can't use what the other pitches
are doing: the octave above, the rest of a chord, harmonics, or a string that's still ringing when it's struck
again. A small recurrent network reading all 88 pitches' note and onset activations can, and a few frames of
look-ahead (a fixed delay, like the traceback length) lets it see a note's attack before committing.
The model. Per-pitch convolutions plus a 128-unit GRU across pitches, trained on a held-out split of
GuitarSet, MAESTRO and vocadito for about 30 minutes on a CPU, with 0, 4 or 8 frames (0, 46 or 93 ms) of
look-ahead, then its decoding thresholds tuned on held-out tracks.
What happened. It lost to the tuned original on most tracks. With 4 frames of look-ahead it beat it on
46% of GuitarSet tracks (Fno) but on 9% of MAESTRO and 1 of 20 vocadito tracks (vocadito Fno .475 against .559).
No look-ahead and 8 frames did worse. Half an hour on a CPU is far too little training for a model like this.
Why it was shelved. After the initial prototype, it was clear that a larger research endeavor including
more held-out labelled audio (for example Slakh2100's test split), model research and many GPU hours would be
required.
What the site uses, and why
The streaming HMM is the Live mode. It makes notes while the audio comes in, typically within a few
frames of their start. It is far better than the original's defaults and close to the tuned original: ahead on
vocadito, behind on MAESTRO Fno (.748 vs .774) and GuitarSet F (.600 vs .636, mostly re-strikes of ringing
strings). Tuned per dataset, it pulls ahead on MAESTRO too.
It still uses its starting parameters. The tuned sets are per dataset, add about 100 ms, and gain 0.01
to 0.04 Fno. There is no single tuned set yet that's better everywhere.
No learned decoder yet, for the reasons above.
Original mode stays for comparison. It is a line-by-line port of
output_to_notes_polyphonic with predict()'s defaults, melodia trick included, and
gives the same notes as the Python code on the test fixtures. Its MIDI files match basic-pitch's notes,
velocities and pitch bends.
Basic Pitch Live runs Spotify's Basic Pitch transcription
model in your browser with LiteRT.js, and turns its output
into notes with a streaming decoder while it runs. Audio never leaves your machine; finished results are saved in
this browser only.