Inspiration

Learning a piece you love is blocked at every step. You may have no piano nearby. The score you want is only printed in its full, hard version. The fingering is missing, or it was written for big adult hands. And practising alone gives you no feedback on whether you rush, drag, or always miss the same bar.

We wanted to see how far a laptop keyboard could go as a practice instrument. Rubatone is named for rubato, the freedom to bend time in a piece. The idea is that the same key can stand for a finger, not a note, and still teach you the hard part of the piano: which finger goes where, and when.

What it does

Rubatone turns a printed piano score into something you can practise on the computer keyboard you already have.

  • Reads your piece. Upload a PDF, drag over the lines you want, and optical music recognition turns them into notes. A sheet-music guard refuses text, photos and lined paper before anything is uploaded. Readings are saved in your browser.
  • Makes it playable. Every piece comes in four layers, from tune plus held bass up to the full score, with the notes each layer adds shown in orange. Fingering is computed once for your hand size (small, medium or large, or measured on screen against a credit card), and any finger can be changed.
  • Flags the hard spots before you play, in plain words ("Bar 2: G♯4, thumb on a black key"), and highlights them on the sheet and the piano roll.
  • Plays and trains. Listen with a sampled piano at 30% to 200% tempo, click anywhere to jump there, then play it as a falling-note game on nine keys, one per finger. A keyboard check warns when your laptop cannot register enough keys at once, so you are not blamed for your hardware.
  • Reports how it went: accuracy per bar, hurried or dragged bars, and at most three things to fix. You can print or download the easier, fingered version.

How we built it

  • Front end: React, TypeScript and Vite, deployed on Cloudflare Pages. OpenSheetMusicDisplay draws the score, Web Audio plays Salamander piano samples, and the falling-note game runs on a canvas. All the musical logic (bar repair, layers, fingering, scoring, the staff detector) is pure TypeScript with no I/O.
  • Fingering: a Viterbi search over each hand's note groups, using a model of how far each finger pair can stretch for a small, medium or large hand.
  • Score reading: a Modal service runs the homr neural reader, one container per line of music, in parallel. The browser calls it directly, with origin checks and daily limits.
  • Kiro was the reviewer, debugger and fixer. Custom agents (contract-auditor, pbt-verifier) attacked the code against the specs. Each suspicion became a property test that failed on the old code, then a bugfix spec, then a fix with no test weakened. Hooks ran the fast tests on save and updated a lessons ledger at the end of each run, and Kiro drove the running app through Playwright MCP. The full record is in docs/kiro.md and docs/bugs.md.

Challenges we ran into

  • Reading music is hard. Measured against the notes in the PDF itself, the homr reader got about 64% to 69% of the notes right on a dense arrangement. We built bar repair and a "needs review" mark so wrong bars are visible, and we say so in the README rather than hide it.
  • We tried a second reader and dropped it. We ran Audiveris beside homr and kept whichever reading had bars that added up. That measured timing, not pitch, so it looked better than it was; against the PDF's own notes neither reader was clearly better. We switched it off and documented why in docs/omr-comparison.md.
  • Machine-read scores break rules. Triplets marked only on the first bars were read as plain eighths, so bars overran. The guard that refuses non-music rejected real scores until Kiro found three cases (beams on staff lines, short last systems, slightly skewed scans).
  • A keyboard is not a piano. Many keyboards drop keys when several are held, so we measure what each keyboard registers and warn before a passage that needs more.
  • Speed. A cold reader container took about 10 s on top of reading time, so we read lines in parallel and keep one reader warm for demos.

Accomplishments that we're proud of

  • A real idea that works end to end: a key is a finger, not a note, and the whole app is built around it. Layers that keep the same fingering, so practice at layer 1 carries over to layer 4, and two kinds of "diff" you can see on the sheet (by hand size and by layer).
  • A tested core: 194 TypeScript and 63 Python tests, including property tests that found real bugs.
  • Kiro as a working teammate: more than 40 defects found, 25 fixed by Kiro itself, 9 of the 11 bugfix specs written by Kiro, and 9 binding lessons (L-14 to L-22) recorded in a steering ledger that later runs cite.
  • Documenting what did not work, including a measurement mistake of our own, instead of only the wins.

What we learned

  • A metric that is easy to compute is not the same as a correct one. "Bars add up" was a proxy for accuracy, and only ground truth from the PDF itself showed it.
  • Property-based tests are a good way to give an agent a job: a suspicion has to become a failing test before anyone is allowed to fix it.
  • Putting the rules in files (specs, steering, a lessons ledger) made Kiro's work repeatable across runs, and made its mistakes easier to catch.
  • Say what a screen measures. People read the colour on our report as speed until we labelled it as notes played and added a separate timing mark.

What's next for Rubatone

  • Better reading. Use the PDF-notehead ground truth to measure and improve score reading, handle 8va lines and long tuplets, and fix the split final bar.
  • More than piano. Because a key means "this finger" and not "this pitch", the same lanes could drive drums and other percussion, with a new mapping from score to lanes.
  • More pieces and teachers. A larger library of public-domain scores, and sharing a fingered version with a teacher.
  • Phones and tablets, with touch lanes instead of a keyboard, for people with no laptop either.

Built With

  • fastapi
  • homr
  • opensheetmusicdisplay
  • pdf.js
  • pymupdf
  • react-19
  • typescript-7
  • vite
Share this project:

Updates

Submission history