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

simplifyMultipleEnharmonics gives different spellings in different octaves #1689

Closed
cooijmanstim opened this issue Feb 24, 2024 · 0 comments · Fixed by #1695
Closed

simplifyMultipleEnharmonics gives different spellings in different octaves #1689

cooijmanstim opened this issue Feb 24, 2024 · 0 comments · Fixed by #1695

Comments

@cooijmanstim
Copy link

music21 version

9.1.0

Problem summary

Spelling of pitches by simplifyMultipleEnharmonics appears to change depending on octave.

Steps to reproduce

Here's what simplifyMultipleEnharmonics gives for f#0, f#1, ..., f#9 in the key of A minor.

ipdb> for i in range(10): music21.pitch.simplifyMultipleEnharmonics([f"f#{i}"],keyContext=music21.key.Key("Am"))
[<music21.pitch.Pitch G-0>]
[<music21.pitch.Pitch G-1>]
[<music21.pitch.Pitch G-2>]
[<music21.pitch.Pitch G-3>]
[<music21.pitch.Pitch F#4>]
[<music21.pitch.Pitch F#5>]
[<music21.pitch.Pitch F#6>]
[<music21.pitch.Pitch F#7>]
[<music21.pitch.Pitch F#8>]
[<music21.pitch.Pitch F#9>]

Expected vs. actual behavior

I believe this should be F# regardless of octave.

TimFelixBeyer added a commit to TimFelixBeyer/music21 that referenced this issue Feb 27, 2024
Fixes cuthbertLab#1689 where the spelling of a pitch was dependent on its octave.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant