ChordScribe

Turns a short music clip into a chord chart, and measures how often it is right.

View source code

Python, FastAPI, Redis, React, TypeScript, OpenTelemetry, Demucs

ChordScribe listens to a clip of 60 to 90 seconds and writes a lead sheet with the key, tempo, beats and chords. The harder question behind it is how to develop an AI system when you can't judge its output at a glance.

Measuring before changing

Every run is scored against songs with known answers, with confidence intervals. A release gate in CI compares the new version with the old one, song by song. On the current set of 11 songs, the default pipeline gets about 89% of major and minor chords right.

The measurements overturned some of my assumptions. Separating the instruments first made the chords worse, so chords are now read from the full mix.

An agent with limits

A review agent can correct the result, but it may only choose among labels that the audio models proposed, and every change is checked.

What doesn't work yet

The melody line is a placeholder: its scores are too low to be useful. Fast songs are sometimes tracked at half their tempo.