Skip to content

Commit

Permalink
If a chordsym has an alter for a degree not in the chord, turn it int…
Browse files Browse the repository at this point in the history
…o an add. I'm assuming this is what "should we throw an exception???? for now yes, but maybe later we should" is referring to.
  • Loading branch information
gregchapman-dev committed Apr 17, 2024
1 parent 48b0639 commit a6a13de
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion music21/harmony.py
Original file line number Diff line number Diff line change
Expand Up @@ -1824,7 +1824,12 @@ def typeAlter(hD):
elif chordStepModification.modType == 'subtract':
typeSubtract(chordStepModification)
elif chordStepModification.modType == 'alter':
typeAlter(chordStepModification)
try:
typeAlter(chordStepModification)
except ChordStepModificationException:
# fix it in place
chordStepModification.modType = 'add'
typeAdd(chordStepModification)

return pitches

Expand Down

0 comments on commit a6a13de

Please sign in to comment.