Writing a note down as one thing is what made it fast

1 month ago

A person plays sixteen notes on a piano keyboard, stops, and the phone plays the rest. The model finishing the tune holds a hundred and twenty-five million adjustable numbers, small enough to run on the phone itself.

Ask

Ask about this presentation

Answers are generated from this presentation.

Chapters

  1. 0:00The phone finishes the piece you started
  2. 0:13The model takes over where the orange notes stop
  3. 0:32The hard part was keeping up with a pair of hands
  4. 0:40Writing a note down as one thing is what made it fast
  5. 1:13Edwardsson kept the version his own numbers said was worse
  6. 1:30The answers get reliable at sixteen notes
  7. 1:37The model was not the hard part
Show transcript

The phone finishes the piece you started

One engineer, about a year of work, fourteen experiments.
free iOS app simedw.com 125M parameters ≈108 notes/sec on an iPhone 15

A person plays sixteen notes on a piano keyboard, stops, and the phone plays the rest. The model finishing the tune holds a hundred and twenty-five million adjustable numbers, small enough to run on the phone itself.

The model takes over where the orange notes stop

The model takes over where the orange notes stop.

MIDI in · a list of key presses and their timings
Orange: the notes a person played. Blue: the model’s continuation.
simedw.com

The keyboard plugs into the phone and sends which keys you pressed and when, not sound. These are the first sixteen notes of Für Elise. Somewhere after them the music stops being Beethoven.

The hard part was keeping up with a pair of hands

The hard part was keeping up with a pair of hands.

The phone is doing all of it, with nothing going out to a server.
runs entirely on-device · App Store privacy label: “Data Not Collected”
simedw.com

To play along with a person, the model has to answer before the next note lands. Simon Edwardsson spent about a year on that, and fourteen experiments.

Writing a note down as one thing is what made it fast

Writing a note down as one thing is what made it fast.

the obvious way
which keyhow hardhow longwhen
Edwardsson tried this version. It sounded right, and it was slow.
what he does instead
which key · how hard · how long · when
≈108 notes/sec on an iPhone 15
what he does instead
which key · how hard · how long · when
≈108 notes/sec on an iPhone 15
The final version has no separate symbol for silence.

A note is four facts: which key, how hard, how long, and how long until the next one. Write that down the obvious way, and one note costs the model four steps of thinking. Edwardsson wrote a note as one item carrying all four facts. One note, one pass. That buys about a hundred and eight notes a second on an iPhone, by his own measurement, well past what a pair of hands needs. That fourth fact, the wait, does the rest of the work. Silence is just a longer wait, and notes played together have no wait between them.

Edwardsson kept the version his own numbers said was worse

Edwardsson kept the version his own numbers said was worse.

the number he was tracking
2.9495 → 2.9998✗lower is better
preferred, side by side
35.7%
64.3% ✓
judged by a separate AI model (Gemini 3.5 Flash), two continuations at a time, every comparison mirrored
He also trained on 5× more music. The models came out worse.
simedw.com

In training, Edwardsson stopped handing the piano model the correct next note, and made the model practise on its own guesses. The number he tracked moved the wrong way. A separate AI model, shown two continuations at a time, picked the version that practised on its own guesses, about two times in three.

The answers get reliable at sixteen notes

The answers get reliable at sixteen notes.

Four notes is the hardest case: there is barely any music to go on.
4 notes · hardest → 8 · better → 16–32 · substantially more reliable
RollTab free iOS 18+ needs a USB or Bluetooth MIDI keyboard no code or weights released
simedw.com

The model answers what you play. Four notes leaves it almost nothing to work with. Sixteen notes or more, and it follows.

The model was not the hard part

which key · how hard · how long · when

The model was not the hard part.

The biggest gains came from how the music was written down, and from cleaning the data.
Think GPT-2, but for piano
— the author’s own summary
write-up simedw.com
On his own list next: closing the gap between the big and middle models, to cut the app’s size and delay.

Edwardsson puts his piano model about where text autocomplete was a few years ago. The model still loops, and he plays along anyway. What made the model quick enough was how a note gets written down.