This is a program that computes the notes for triad and seventh chords. I use an automaton
where
- Support double sharps and double bemols
- Support seventh chords
- Create the automaton
$S$ for recognizing valid words for the language of the automaton$C$