https://primanota.net/john-mark-mcmillan/counting-on-chords.htm