Back to blog
Help & Tools7 min read

How Does AI Transcribe Piano from YouTube? (NotaGen Explained)

A plain-English walkthrough of how modern transformer-based models turn audio waveforms into sheet music. Why solo piano works best.

The problem nobody could solve for 50 years

Automatic music transcription has been a research goal since the 1970s. The problem statement is simple: input is an audio recording, output is sheet music or MIDI. Every step in between is hard.

Early approaches used signal processing, Fourier transforms to find frequencies, peak detection to find note onsets. These worked on pure sine waves and barely worked on real music. A piano note isn't a single frequency; it's a fundamental plus a stack of harmonics that overlap with the harmonics of every other note being played.

The 2010s brought convolutional neural networks that learned to recognize note-onset patterns directly from spectrograms. Big jump in accuracy. Still couldn't handle dense polyphony, pianists routinely play 4-8 notes simultaneously, and CNN onset detectors couldn't always tell them apart.

The 2020s brought transformer-based sequence models trained on tens of thousands of hours of paired audio + MIDI. Suddenly, "good enough to use" became real.

What "transformer" means here

The same architecture that powers ChatGPT powers modern music transcription. Different inputs (audio frames vs. text tokens), same fundamental idea: take a sequence in, predict the most likely sequence out.

For transcription, the input is a sequence of audio frames (the song chopped into ~10ms slices, each represented as a spectrogram patch). The output is a sequence of MIDI events ("note on, pitch 60, time 1.2s", "note off, pitch 60, time 1.5s", etc.).

The model learns by being shown millions of (audio, MIDI) pairs during training. Eventually it learns the mapping well enough that it can transcribe audio it has never heard.

Why solo piano works best

Three reasons:

  • Big training datasets exist. The MAESTRO dataset alone has 200+ hours of competition-quality piano performances with frame-aligned MIDI. There's nothing equivalent for solo violin or solo flute.
  • Piano is harmonically clean. A struck piano string vibrates predictably. The model can learn its harmonic profile and subtract it from the spectrogram, isolating one note at a time.
  • Notes don't bend. A pianist can't slide between notes the way a string player can. Discrete onsets are easier to detect than continuous pitch changes.
  • Multi-instrument transcription (piano + drums + guitar + vocals) is an active research area. Tools like Spleeter can separate stems, then transcribe each separately. Quality is improving but still rough. For now, "AI sheet music" effectively means "solo piano AI sheet music".

    What we use and how it fits in

    When you paste a YouTube link, a few steps run one after the other:

  • Getting the sound: we take the audio from the video. Videos up to 5 minutes long are accepted.
  • Checking it is solo piano: a quick test measures how much of the sound is drums and other percussion. A full band with drums and singing is turned away, because its notes would come out as noise.
  • Finding the notes: a piano transcription model listens to the recording and writes down every note it hears: which key, when it starts, when it stops and how hard it was played. It also hears when the sustain pedal is down.
  • Finding the beat and the bars: a second model, a beat tracker, listens for the pulse of the song and for the first beat of every bar. That gives the tempo and the time signature: 4/4, 3/4 or 6/8.
  • Tidying the notes into sheet music for two hands: each note is lined up with the beats and rounded to a clean value (quarter, eighth, sixteenth, and triplets only where the music clearly has them). The key is worked out from the notes, so the sharps and flats match it. Then the notes are shared between the hands: each hand stays within a playable stretch, a melody stays in one hand, and a note held over a barline is tied.
  • Delivery: the song is written out as sheet music you can play, check and fix bar by bar. With Premium it downloads as a sheet music PDF to print and as a MIDI file.
  • A 3-minute song usually takes one to two minutes from start to finish. Most of that is downloading the audio and running the two listening models on a graphics card in the cloud.

    What "85% accurate" really means

    When we say "90% note accuracy", that's measured against a ground-truth MIDI file from the same performance. It does not mean 90% of measures are correct, wrong notes are spread out, so most measures have at least one error.

    Where errors come from:

  • Octave errors, a note correctly identified, wrong octave. Easy to fix in MuseScore.
  • Rhythm rounding, the AI snaps to the nearest 16th note, which is wrong for swung or rubato passages.
  • Missed soft notes, pianissimo notes can fall below the model's confidence threshold.
  • Phantom notes, strong reverb tails sometimes get interpreted as new note onsets.
  • For practice purposes, 90% is usable. For published sheet music, you'd hand-edit afterward in MuseScore (which is exactly what professional engravers do, start from a rough computer pass and clean up).

    Where the field is going

    Three frontiers:

  • Multi-instrument, separating piano from strings from drums from vocals, then transcribing each. Demucs and similar source-separators keep getting better.
  • Expression preservation, capturing dynamics, articulation, pedal usage. Current models drop most of this.
  • Style-aware engraving, knowing that this is jazz and should be written in lead-sheet form vs classical that should be fully voiced.
  • In 2 years, expect "AI sheet music" to handle full-band transcriptions at the quality solo piano gets today.

    Try it for yourself

    The fastest way to understand what AI transcription is and isn't good at is to feed it a song you know intimately and read the output. Convert a YouTube cover here and compare the AI output to your mental model of the piece. The errors will teach you more than any blog post.

    Ready to start playing?

    Put it into practice with thousands of color-coded, slow-down-able songs, free in your browser.

    Keep reading