Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getPitches(direction=DESCENDING) returning ascending scales #1311

Merged
merged 3 commits into from
May 23, 2022

Conversation

jacobtylerwalls
Copy link
Member

@jacobtylerwalls jacobtylerwalls commented May 18, 2022

Before:

>>> c_maj = scale.MajorScale('C')
>>> c_maj.getPitches(direction=scale.Direction.DESCENDING)
[<music21.pitch.Pitch C5>, <music21.pitch.Pitch B4>, <music21.pitch.Pitch A4>, <music21.pitch.Pitch G4>, <music21.pitch.Pitch F4>, <music21.pitch.Pitch E4>, <music21.pitch.Pitch D4>, <music21.pitch.Pitch C4>]
>>> c_maj.getPitches(direction=scale.Direction.DESCENDING)
[<music21.pitch.Pitch C4>, <music21.pitch.Pitch D4>, <music21.pitch.Pitch E4>, <music21.pitch.Pitch F4>, <music21.pitch.Pitch G4>, <music21.pitch.Pitch A4>, <music21.pitch.Pitch B4>, <music21.pitch.Pitch C5>]

Two commits:

  • 3e16218 fixes a more esoteric problem that I expected would help in some way,
  • but it turned out that just 3cf3fa0 fixes what brought me here.

Tests for both.

@jacobtylerwalls jacobtylerwalls changed the title Fix getPitches(direction=DESCENDING) returning ascending scales Fix getPitches(direction=DESCENDING) returning ascending scales May 18, 2022
@coveralls
Copy link

coveralls commented May 19, 2022

Coverage Status

Coverage increased (+0.001%) to 93.049% when pulling 110802e on cache-scale into 0d3d7b1 on master.

@mscuthbert
Copy link
Member

Thank you! Wonderful fix.

@mscuthbert mscuthbert merged commit 562aede into master May 23, 2022
@jacobtylerwalls jacobtylerwalls deleted the cache-scale branch May 23, 2022 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants