Skip to content

Commit

Permalink
Include scale name in hash again
Browse files Browse the repository at this point in the history
  • Loading branch information
TimFelixBeyer committed Feb 29, 2024
1 parent 1aec115 commit 764f509
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions music21/roman.py
Original file line number Diff line number Diff line change
Expand Up @@ -3489,10 +3489,11 @@ def key(self, keyOrScale):
elif 'Scale' in keyClasses:
# Need unique 'hash' for each scale. Names is not enough as there are
# multiple scales with the same name but different pitches.
scaleHash = keyOrScale.name
if getattr(keyOrScale, 'isConcrete', False):
scaleHash = "_".join([p.nameWithOctave for p in keyOrScale.pitches])
else:
scaleHash = keyOrScale.name
scaleHash += "_".join(
[p.nameWithOctave for p in keyOrScale.pitches]
)
if scaleHash in _scaleCache:
keyOrScale = _scaleCache[scaleHash]
else:
Expand Down

0 comments on commit 764f509

Please sign in to comment.