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

streamStatus accidentals inconsistencies #1668

Open
jacobtylerwalls opened this issue Nov 21, 2023 · 0 comments
Open

streamStatus accidentals inconsistencies #1668

jacobtylerwalls opened this issue Nov 21, 2023 · 0 comments

Comments

@jacobtylerwalls
Copy link
Member

jacobtylerwalls commented Nov 21, 2023

music21 version

9.2.0b2

Problem summary
Accidentals are remade on streams that users may have already made accidentals for instead of short-circuiting. Discovered responding to #1667.

Steps to reproduce

n = note.Note()
n.pitch.accidental = pitch.Accidental('flat')
n.pitch.accidental.displayType = 'never'
n.show()

Expected vs. actual behavior
Expected: no accidental
Actual: accidental

More information
PartExporter.fixupNotationMeasured() checks haveAccidentalsBeenMade():

if not part.streamStatus.haveAccidentalsBeenMade():

But makeAccidentals sets the property instead:

if isinstance(s, Stream):
s.streamStatus.accidentals = True

But even PartExporter.fixupNotationMeasured() is probably too late, given that fromGeneralObject() runs first, runs makeNotation, and neither streamStatus.accidentals nor streamStatus.haveAccidentalsBeenMade() is checked.

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

No branches or pull requests

1 participant