TL;DR
Human musicians don’t play like metronomes—they speed up, slow down, and stretch time for emotion, making it notoriously difficult for computers to turn a live digital keyboard performance into clean sheet music on the fly. Researchers at Carnegie Mellon University built a real-time transcription system that writes sheet music note-by-note with zero lookahead and a snappy 1.75 ms latency. By pairing a fast, live "student" model with a slower, hindsight-equipped "teacher" model, they deliver instant visual feedback that seamlessly self-corrects in the background as you keep playing.
What Problem Does This Paper Address?
If you sit at a digital piano and record yourself, the instrument captures MIDI data: exact pitches and millisecond timestamps of when keys go down and up. Turning that raw log into readable sheet music is called Performance-MIDI-to-Score (PM2S) transcription.
It sounds simple until you try it. Sheet music requires rigid metrical grids: beats, bar lines, time signatures, and separating left-hand from right-hand staves. Expressive human timing obscures that underlying grid. Until now, PM2S systems solved these ambiguities by cheating on time—waiting until a piece (or a massive chunk of it) was finished so they could look into the "future" of the performance before deciding how to notate the past. That makes live applications, like watching your improvisation turn into sheet music in real time, impossible.
Doing this causally (note-by-note, with zero future context) introduces three headaches: you don't know how long a note will be held when the key is first pressed, measure-level structure takes several notes to become obvious, and early guessing mistakes snowball in autoregressive models.
Methods
To crack real-time transcription, the authors rethink both what the model predicts and how two different Transformer architectures can collaborate.
- Compact Event-Synchronous Representation: Instead of trying to output complex notation symbols all at once, the system emits exactly one minimal prediction per note onset: its staff (left or right hand) and a combined metrical position called a tactum (which bundles the main beat, or tactus, with its fine subdivision, or tatum). Everything else—note durations, bar lines, key signatures—is inferred lightweightly during post-processing as note-offs arrive.
- Online + Offline Architectures: Both models use Rotary Position Embeddings (RoPE) and predict the exact same 1-to-1 note targets. The Online model is a strictly causal, decoder-only Transformer that predicts each note's state using only past and current inputs. The Offline model is an encoder–decoder Transformer whose bidirectional encoder sees a wide 512-note window of past and future context.
- Note-Aligned Knowledge Distillation (KD): Because both models share a strict one-to-one correspondence between input notes and output tokens, the authors align their final hidden states directly at every note via a learned linear adapter. To prevent the teacher from relying on cleaner historical context than the student gets, they introduce Matched-History Masking: randomly masking 75% of prior score labels using the exact same mask for both teacher and student during training.
- The Hybrid Loop: During a live performance, the online model renders notes immediately. Every 256 notes, the offline model wakes up, re-evaluates the latest 512-note window in the background, fixes earlier mistakes, and hot-swaps the cleaned-up history into a parallel online instance so future live predictions build on solid ground.
Datasets
The models are trained and evaluated on PianoCoRe, a dataset providing note-level alignments between musical scores and expressive human MIDI performances. Following prior benchmarks (specifically Beyer et al., 2024) to ensure clean comparisons without data leakage across splits, the authors heuristically align MusicXML scores to MIDI and filter out poorly aligned pieces—resulting in 1,206 training, 77 validation, and 80 test scores (totaling over 105,000 performances). No new datasets were introduced.
Key Insights and Ideas
- Don't let the teacher have an unfair memory advantage: The standout "aha" moment comes from the ablation studies on Matched-History Masking. If you distill knowledge from an offline teacher without masking its decoding history the exact same way you mask the student's ("No SM"), the student's error rate balloons from 12.7% to 19.0%—worse than not using distillation at all (13.5%)!
- Aligning final task states beats overcomplicating KD: Simple Smooth-$L_1$ alignment on the final hidden state outperformed both output-level KL divergence and complex layer-by-layer distillation, even across heterogeneous architectures (decoder-only vs. encoder–decoder).
- Zero translation tax: Because the online and offline models speak the exact same token language, splicing offline corrections back into the live causal stream requires zero representation translation and actively reduces subsequent live errors.
Key Results
Tested on a consumer MacBook Pro M1, the system hits real-time speeds without sacrificing accuracy:
- Blistering Speed: The online model averages 1.75 ms latency per note (57.4x faster than real-time performance duration) with 0.00 seconds of structural lookahead delay. Compare that to the previous offline Transformer state-of-the-art, which requires a 21.94-second structural delay.
- Closing the Offline Gap: Standard MUSTER transcription error for the baseline online model is 13.49%. Adding note-aligned knowledge distillation drops that error to 12.65%, narrowing the gap toward the full-context offline teacher (11.39%).
- Compounding Hybrid Wins: Feeding just a single 256-note offline-refined prefix back into the online model reduces subsequent live note-onset errors by 5.0% and left/right-hand staff assignment errors by 16.2%. Once the piece finishes, a final offline sweep brings total accuracy to 11.39%, matching pure offline transcription.
Limitations and Future Work
- Rare Time Signatures: Compound meters are mapped to canonical beat counts, and unsupported rare asymmetric meters (such as 7/8) are excluded from training.
- Provisional Local Attributes: Because a note's duration isn't known the millisecond a key is struck, attributes like exact note values, time signatures, and measure boundaries must take provisional values at note onset and rely on rule-based post-processing (such as mapping MIDI note-offs to quantized grid positions and running the Krumhansl–Schmuckler key-finding algorithm) as events unfold.
- Concurrent Baselines: The authors note that a concurrent offline frame-level PM2S model (DuET) was released after their experiments concluded and thus awaits future comparison.
Summary updated