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

AccidentalCalculator: Fix natural accidentals not remembered within measure #1384

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

chbauman
Copy link
Contributor

Adresses and fixes #1383

Now it looks like this:
after

@sschmidTU
Copy link
Contributor

sschmidTU commented May 23, 2023

Hey @chbauman, thanks for the contribution, however this change causes some duplicate natural accidentals.
Minimal reproducing sample:
image

Musescore:
image

sample:
test_accidental_natural_repeat.zip

There's even a "double natural" in Dichterliebe measure 9:
image

So I suspect this is rather a workaround or in any case not taking all variables into account.
In this case it seems like your change works for extra accidentals/naturals in C major key signature but not in other key signatures like D major.

The accidental display code is clearly not optimal in OSMD and there are other issues e.g. with courtesy accidentals, and I've had a quick look before, but it looks like the accidental code needs a slightly more holistic fix.

ps: please attach your samples zipped, if relevant, e.g. the sample you showed above. otherwise everyone who wants to reproduce your result needs to reproduce the MusicXML sample first.

The previous accidental must not be discarded if the current alteration is also a natural.
@chbauman
Copy link
Contributor Author

Thanks for reviewing, it is still not working. I will have a closer look into it.

@sschmidTU sschmidTU changed the title Update AccidentalCalculator.ts AccidentalCalculator: Fix natural accidentals not remembered within measure Sep 19, 2023
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.

Natural accidentals are not remembered within measure
2 participants