Projects / Reference
Chord Coach
Helps you draft a chord chart from a recording: it suggests the tempo, the bars and the chords, you confirm or correct each one, and then you practise with the chart you finished.
Screenshots
About this project
SAMPLE PROJECT / REFERENCE IMPLEMENTATION. Built by the course developer before the term to prove this submission path works. Not student work.
The page reads an audio file, finds its tempo and beats, and works out which chord is sounding over each one: a windowed FFT becomes a chroma - how much of each of the twelve notes is present - and each beat's chroma is matched against a hundred and eight chord templates. A small Viterbi search picks the best sequence rather than the best chord for each beat on its own, which is what stops a passing note becoming a chord of its own - and a seventh is only allowed to rename a chord if it is really being held, which is what stops a melody touching the seventh on its way past from turning a plain G into Gmaj7. The bass is followed in a band of its own, heard through its harmonics because down there an FFT bin is wider than a semitone, which is how A/C# is told from A, and the overtones every plucked string adds are subtracted back out before anything is named.
None of that is presented as the answer. Everything the analysis finds - every chord, the tempo and where it changes, the key, the time signature, where bar one is - arrives as a suggestion, drawn faded, and becomes part of the chart only when somebody has listened and confirmed it or typed the right one. A detector that is right nine times in ten is wrong somewhere on every page, and a band reading a chart on Sunday needs to know which parts were checked. When nothing on the chart is a guess it is finished, and the practice tools open: a speed control that keeps the pitch, an A-B loop, transposing, a capo, and the chord playing now and next as guitar diagrams. Finished charts go into a shared archive with the song's title and artist, so the next person to want that song already has it.
It is reference project G: the signal-processing path, and the honest answer to "can it just take a YouTube link?" - it cannot, and the page says why.
Problem and purpose
Working out chords by ear is slow, and the tools that claim to do it for you upload your recording and hand back a chart nobody has checked. This drafts one in the browser, on your own file, marks every guess as a guess, and leaves the deciding to the person who can hear the song.
Intended users
Guitarists working out a song from a recording, and students who want to see that "the computer worked out the chords" is arithmetic they can read.
Major features
- A first draft - tempo, beats, bars and chords - from any audio file, in the browser, every suggestion faded until it is confirmed or corrected
- Five sensitivities, from Calm (triads, a chord a bar) to Everything, chosen before the first draft; drafting again at another keeps each draft as a set of candidates, offered beat by beat
- Tempo markings where the tempo changes, suggested from the beats and set by the reader; counting at half or double speed redraws the grid
- A trained beat model (Beat This!, ISMIR 2024) that refines the beats and bar lines on the visitor's own graphics card
- Nine kinds of chord and inversions - D/F# is heard from the bass note, not guessed
- A chart in bars, four beats to the bar, where every beat can be typed over: two chords in a bar cost nothing
- A shared archive of charts already worked out, so nobody does the same song twice
- The number system: the same chart written 1 4 5 6m, which is how a worship band calls chords out and what lets the key move for whoever is singing
- Three levels of detail - triads only, sevenths when they are really held, or everything - switched without listening to the recording again
- Sections, every chord in the song as diagrams, and a capo that changes the shapes rather than the chart
- A chord sheet used as a guide - photographed or pasted - read in degrees and put back in the key of the recording, so a sheet in C and a recording in G still line up
- The chord now and the chord next, as guitar diagrams with finger numbers, open strings and barres
- A capo suggestion that turns the song into open chords
- Once the chart is finished: transpose, slow down with the pitch kept, and loop a section
- A draft kept in the browser as you go, and saved charts marked draft or finished
- A demo track synthesised for the project, so the chords it should find are known and the tests can check them
Known limitations
A YouTube link cannot be analysed: a browser will not let a page read the audio of a video from another site, and pulling the audio down on a server would break YouTube's terms. The page explains this rather than hiding it.
Nine kinds of chord - major, minor, 7, m7, maj7, sus4, sus2, dim, aug - and inversions, but no ninths or altered chords: every template added makes every other chord easier to mistake. Anything can still be typed in by hand.
The archive is a folder of charts, not a service that accepts uploads; a new chart is exported and sent in. It holds chord grids with a title and an artist - no audio, no lyrics, no sheet music - and the charts that ship with it are hymns in the public domain. The recording itself is never uploaded, copied or hosted, and the song is named - title, artist, CCLI number - rather than reproduced.
Dense mixes, heavy distortion and piano voicings confuse it; free-time passages are walked through at the tempo around them; chord changes are assumed to fall on beats. The beat model runs by itself only where the browser lends it a graphics card - without one it is offered, and takes minutes on the processor. Analysis takes a few seconds for a whole song. Drafts live in the browser's local storage, so they are per-browser unless the chart is saved to a file.
The chord-sheet reader reads chord sheets - chord names over lyrics - and not printed staff notation, which is a research problem nobody has solved well enough to hand to a class as though they had. It is about nine megabytes and loads only when somebody photographs a sheet.
How it is built
analyse.js takes samples and a sample rate and returns a chord chart: it touches neither the page nor the Web Audio API, which is why tests/chord_test.mjs can run the whole detector under Node with no browser. worker.js is four lines around it, and exists because several seconds of analysis on the main thread is a page that looks broken. chords.js knows about guitars and nothing about audio: open shapes are a table, everything else is the E and A barre shapes moved up the neck.
Who built it
-
Dr. Taegil Ha
Author (reference implementation)
Wrote the project as the course's worked example of this submission path.