yomoram / Lab · 日本語

Song sections and chords, analysed

Two Creative Commons songs by Josh Woodward, analysed automatically: their chord progressions, and their sections (intro, verse, chorus and so on), turned into a guitar TAB. Press play to hear the song together with a synthesized guitar playing the TAB.

The chords are estimated in three steps: ① read straight from the song, ② read again from the song split into parts, ③ fixed with the help of the estimated sections. Switch between them to hear what changes. Josh Woodward publishes his own chord charts, so each step is also compared with the composer’s chords. Everything here is an automatic estimate and contains mistakes; how it works is explained further down.

Music: Josh Woodward, “Goodbye To Spring” (CC BY 4.0), joshwoodward.com. Loading the song… (the TAB’s guitar plays on its own meanwhile)

The chorus, three waysbars 49–64(1:36–2:08)

The same chorus, played with the guitar for each set of chords. Press another row while it plays to switch at the same place. Coloured bars changed from the row above.

B♭sus2B♭maj7Gm7Gm7B♭sus4B♭sus4FFsus4B♭sus2B♭sus2Gm7Gm7B♭sus4B♭sus4F/AA♭maj7
B♭sus2B♭maj7Gsus4Gm7E♭maj7E♭sus2Fsus4Fsus4B♭sus2B♭maj7Gsus4Gm7E♭maj7E♭sus2Fsus4Fm7/A♭
B♭maj7B♭maj7Gm7Gm7E♭maj7E♭sus2FDm7/FB♭maj7B♭maj7Gm7Gm7E♭maj7E♭maj7Fmaj7Fm7/A♭
0:00 / 4:06Bar 1 · IntroFsus4
Chords

② corrected on the idea that a part that comes back (a chorus, say) has the same chords at the same place each time. Red marks: bars that changed from ②. (32 of 123 bars)

Listen

The four parts the AI model split the song into for ② (separated from the original recordings). All at 100% gives the song back.

The whole songAcross: bar numbers. Click a strip to go to that bar

1173349658197113
Sections (estimated)
Intro
Verse
Pre-chorus
Chorus
Verse
Chorus
Bridge
Interlude
Chorus
Outro
Key (local)
B♭
B♭
B♭
D
B♭
B♭
F
Where the voice sings
Repeated lyric lines
Bars fixed in ③
IntroVersePre-chorusChorusInterludeBridgeKey changeOutro

Key (local): the key heard over the 8 bars around each bar, which shows where the song changes key. Where the voice sings: the level of the separated vocals, darker when louder. Repeated lyric lines: the vocals run through speech recognition, darker where a line sung earlier comes back (the words themselves are not shown here or given to the AI).

Chords of each sectionThe first time each estimated section comes; × is how many times it comes in the song

Intro ×1 Fsus4 → B♭maj7/F → B♭maj7 → Gm7 → B♭maj7 → Fm/A♭ → Fsus4 → Csus4/G
Verse ×2 B♭maj7 → Fmaj7 → Gm7 → E♭ → B♭maj7 → E♭maj7 → E♭sus2
Pre-chorus ×1 Fmaj7 → F7 → B♭ → B♭maj7
Chorus ×3 B♭maj7 → Gm7 → E♭maj7 → E♭sus2 → F → Dm7/F → B♭maj7
Bridge ×1 D → Dsus4 → Gsus2 → Dsus4 → E♭dim → E♭maj7
Interlude ×1 B♭maj7 → F7 → Gm7 → E♭maj7
Outro ×1 F → Fmaj7 → Ddim/F → Fdim → Bdim/F → Dm7/F → Bdim/F

Guitar TAB③ Fixed with the song’s sections · red marks: bars that changed from the step before

How it works

① Fast reading

The song’s beats and bars are found, and for each bar the strength of the 12 pitch classes (C, C♯, D…) is measured. That profile is matched against chord templates: the root (the note the chord is built on) is chosen first from the bass, then the chord that fits best.

② Reading the separated parts

A source-separation model (SCNet Small) splits the song into vocals, drums, bass and other instruments. Without the vocals and drums, the bass and other instruments are read the same way as in ①, so the notes of the melody are no longer mistaken for chord tones. ① and ② are the “first” and “detailed” analyses of Song to Guitar TAB, the browser tool.

Estimating the sections

Rules first set down the facts and a draft of where the sections are. Then an AI (Claude Haiku) looks at them and decides the boundaries and names (intro, verse, pre-chorus, chorus, interlude, bridge, key change, outro). Finally, rules correct anything that goes against the facts.

The rules for the sections
  1. Bars with the voice: bars where the separated vocals are within 15 dB of the song’s typical sung level (the median of the louder half). Gaps of 1–2 bars count as breaths.
  2. Where the singing starts and ends: the first and last sung bars. If only the first bar is quiet, it is a pickup and the next bar is the start.
  3. Local key: the bass and other instruments over the 8 bars around each bar, compared with the typical note profile of every major and minor key (the Krumhansl key profiles). The song’s own key, its relative and parallel keys and its neighbours on the circle of fifths do not count as a key change; another key has to last 6 bars or more.
  4. Repeated lyric lines: speech recognition (Whisper) on the separated vocals; the text of every 2 bars is compared with what came before, and a line counts as a repeat when 30% or more of its letter pairs match. The words are only used for this, on my computer; they are not shown here or given to the AI.
  5. A draft: a typical song form (intro → verse → pre-chorus → chorus → interlude → verse …) with typical lengths (8 or 16 bars), fitted to the voice, its pitch (verses lower, choruses higher), repeated chords and the share of out-of-key chords.
  6. Allowed boundaries: where the voice comes in or stops, and every 4 bars from there.
  7. The AI’s part: with 1–6 and the draft, it chooses the boundaries and names, using general knowledge such as “a chorus repeats earlier lyrics and is often sung higher”.
  8. Final rules: before the first sung bar is the intro, after the last one the outro. A sung section mostly in another key, with no section of the same name in that key, is a key change.

③ Fixed with the song’s sections

Sections with the same name (every chorus, say) are laid over each other and the bars at the same place compared. Rules find the suspicious bars and offer candidate chords; the AI (Claude Haiku) picks one.

The rules for fixing chords
  1. Laying sections over each other: the longest one is the reference; the others shift by up to 4 bars to where their roots match best.
  2. Suspicious bars: (a) bars whose chord differs from the same place in another occurrence, (b) bars read as sus2 (no third), (c) an out-of-key chord that occurs only once. A sus2 is often a chord whose third, the note that makes it major or minor, was not heard.
  3. Candidates: the bar’s reading in ②, the readings at the same place elsewhere, the reading in ①, and plain triads of these (a sus2 becomes the major or minor triad the local key implies). No new chords are made up.
  4. How well each fits: every candidate gets a score from 0 to 1 for how well it matches the bar’s sound and the average sound of the bars at the same place.
  5. The AI’s part: it picks one candidate, looking at the key, the chords around it, the section and the scores.
  6. A check: a change of root is kept only if it fits the bar’s sound nearly as well (within 0.05). A change of chord type on the same root (B♭sus2 → B♭m) is kept, since the sound alone cannot tell whether the third is there.

How close it gets

Compared with Josh Woodward’s own chord chart on his site: following the chart’s chord changes in order, how many are found in the estimated sequence (root / root and major or minor (number of changes)). Extra chords in the estimate are not counted against it.

Part① Fast② Parts③ Sections
the whole song46 / 45 (of 58)53 / 44 (of 58)52 / 46 (of 58)

The chart is written in C shapes for a guitar tuned down a whole step, so it was compared at the pitch it sounds, B♭. The estimated order of sections (intro, verse, chorus, verse, chorus, bridge, solo, final chorus) matches the chart.

The tool’s estimate for the whole song: key F, 120 BPM, 123 bars.