Get the latest tech news

How Chordcat works – a chord naming algorithm


A look into the chord-naming algorithm used in chordcat

As discussed in the previous section, we can simply take the modulo of these indices with 12 and store them in a set to name our chord (no duplicates). In our chord naming function, we've got the second for loop iterating through each of the notes considering each of them the root, one at a time. omitted tones (The notes present in the database entry but not in our intervals set) num_accidentals (the sum of extra and omitted tones, this is used for sorting)

Get the Android app

Or read this on Hacker News

Read more on:

Photo of chordcat

chordcat