Chords and scales in Python