Check a descending range against the altered pitch (AI) - #2043
Merged
mscuthbert merged 1 commit intoSep 23, 2026
Merged
Conversation
realizeAscending decides whether a pitch is in range by the pitch it
collects, alteration applied; realizeDescending decided by the pitch
before alteration. So coming down, harmonic minor's raised seventh was
judged by the lowered one: left out where it belongs and let in where
it does not.
>>> sc = scale.HarmonicMinorScale('c4')
>>> sc.getPitches('b2', 'e3', direction=scale.Direction.DESCENDING)
[<music21.pitch.Pitch E-3>, <music21.pitch.Pitch D3>, <music21.pitch.Pitch C3>]
>>> sc = scale.HarmonicMinorScale('b-3')
>>> sc.getPitches('c#4', 'g#4', direction=scale.Direction.DESCENDING)[0]
<music21.pitch.Pitch A4>
Compare the collected pitch, as realizeAscending does.
mscuthbert
approved these changes
Sep 23, 2026
mscuthbert
left a comment
Member
There was a problem hiding this comment.
Thanks for all this. Btw- alteredNodes was never a concept I fully bought into. I think that it will eventually be something to remove from the system, and just place the harmonic minor nodes accordingly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
realizeAscending decides whether a pitch is in range by the pitch it collects, alteration applied; realizeDescending decided by the pitch before alteration.
Compare the collected pitch, as realizeAscending does.