packets & pianos

July 12, 2026

A weekend build: the AI that trades fours with me (and taught me to hear an octave)

Two days with an AI coding agent: a local model that answers my piano phrases through a Vienna grand, and an ear-training loop that found — and fixed — a specific hole in my hearing.

pianomidiailocal-modelslearning

I’ve started two AI-music projects before this one. Both worked, neither lasted — one lived in a chat window and a cloud host, the other on my desktop with no real structure. This weekend, working with an AI coding agent, I built the third attempt differently: specs first, an adversarial review of those specs before building, and every decision written down. Two days later there’s something my earlier projects never reached — a thing I practice with.

What it does

I play a phrase on my piano. A small music model running on my own GPU (Stanford’s Anticipatory Music Transformer — 128M parameters, nothing exotic) listens to the actual MIDI, and about a second later it answers through a Vienna Synchron grand piano, on the monitor beside me, notes lighting up as it plays. Trading fours with something that heard me — not a backing track. Both sides get recorded as separate MIDI tracks.

The bench: verdict page on the left, Reaper and the Vienna grand on the right

The part I didn’t see coming

I read music fine, but my ear is weak — I can’t reliably tell a perfect 5th from an octave by sound. So we pointed the same machinery at ear training: the partner plays a short figure, I sing it back (yes, out loud), then play what I heard. Deterministic code scores the intervals — and names the misses in teacher language: “classic inversion trap — same letter, wrong half of the octave.”

Three practice sets in one evening:

There’s a profile file on my disk now that knows exactly which intervals I own and which ones fool me, updated every rep. Next session, the AI coach reads it and decides what we drill.

Why this one will stick

Not because the code is fancier. Because it does something I actually want every day (I went back to the bench three times tonight), and because the project has bones: specifications, decision records, a review process that caught real design errors before they were built. The build went fast — the understanding is written down so I can catch up to my own project.

More to come — this is day two.