diff --git a/music21/chord/__init__.py b/music21/chord/__init__.py index 3457dccda..17702aa5c 100644 --- a/music21/chord/__init__.py +++ b/music21/chord/__init__.py @@ -4891,6 +4891,12 @@ def commonName(self) -> str: >>> chord.Chord('C E G C-').commonName 'enharmonic equivalent to major seventh chord' + + >>> chord.Chord('C E G B--').commonName + 'enharmonic equivalent to minor seventh chord' + + >>> chord.Chord('C E G A').commonName + 'minor seventh chord' ''' if any(not p.isTwelveTone() for p in self.pitches): return 'microtonal chord' @@ -4948,14 +4954,19 @@ def commonName(self) -> str: forteClass = self.forteClass # forteClassTn = self.forteClassTn - def _isSeventhWithPerfectFifthAboveRoot(c: Chord) -> bool: + def _isSeventhWithPerfectFifthsAboveRootAndThird(c: Chord) -> bool: ''' For testing minor-minor sevenths and major-major sevenths ''' if not c.isSeventh(): return False hypothetical_fifth = c.root().transpose('P5') - return hypothetical_fifth.name in c.pitchNames + if hypothetical_fifth.name not in c.pitchNames: + return False + hypothetical_seventh = c.third.transpose('P5') + if hypothetical_seventh.name not in c.pitchNames: + return False + return True enharmonicTests = { '3-11A': self.isMinorTriad, @@ -5002,7 +5013,7 @@ def _isSeventhWithPerfectFifthAboveRoot(c: Chord) -> bool: # minor seventh or major seventh chords, # but cannot just test isSeventh, as # that would permit C E G A## (A## as root) - if _isSeventhWithPerfectFifthAboveRoot(self): + if _isSeventhWithPerfectFifthsAboveRootAndThird(self): return ctn[0] else: return 'enharmonic equivalent to ' + ctn[0]