-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Natural accidentals are not remembered within measure #1383
Comments
The relevant musicxml file is in the following .zip: (Attaching .musicxml directly is now working) |
I can still reproduce the original issue with version Did you use the pull request branch? Because there I added some more changes that fixed some of the newly introduced problems with the first commits. But I think there was still the issue with the double natural in "Dichterliebe" that remained and I did not have the time yet to look further into that. |
I meant that I can't reproduce it in the public demo, which is base OSMD 1.7.6. |
Do you use Transpose? There's an issue where sometimes accidentals change if you change Transpose after render() |
Simon, I think the problem appears when you transpose the music, let's say to -2, then revert back to 0. In that case, all accidentals are marked on each note, even though they are in the key signatures. Naturals are always marked. Look at this example, the first shot below is how the music is shown by default: Here below, the same music is transposed correctly one tone lower (-2): Then, I transpose it back to its original key (tranposition to 0): Is that something that can be fixed? |
Right, that makes sense, good find. |
I understand. The only problem with "reloading" the file is that if you have hidden any instruments from the score, they'll reappear, and you may need to hide them again. And I think the same would happen to any other modification you may have done to the score. So the operation may become cumbersome. It'd be nice to have the transposing feature to just work correctly without having to reload the file ;) |
Hi @sschmidTU , hi @fablau ! |
@ammatwain you are absolutely right! I just tried to remove that clause and it works just fine! I hope there are not "side effects" by removing that check.... @sschmidTU can you confirm that? This would solve a great deal of problems ;) Thank you! |
Grazie a te, Fabrizio! The main idea was to make it work by directly passing the key signature as a value (then I added octaves as requested by Simon). The issue was transposing from key "x" to key C (zero). In this case, TransposeCalculator didn't react. So, I started "dirtying up" the values passed to Essentially, this was a workaround to bypass the condition checks I found in three routines (hopefully, there are no others). Here they are listed and commented:
In the latest version I'm working on, I removed the "dirtying up" from the value passed to Certainly, those conditions were put there cautiously, probably to allow the sheet to regenerate without TransposeCalculator's supervision. However, as you can see, they end up causing problems themselves. P.S. I have updated the demo of Until we write again :) |
Hello @sschmidTU , is there a variable I can use to know that the score has just been loaded and it's the first time it has been rendered? Something like |
@ammatwain No, unfortunately not, because usually it doesn't matter and the developer can easily track it, unless of course you're within OSMD. So, we could add such a variable. I would instead make it |
|
agreed! I'll think about where to put it. Probably in |
I was thinking that
This way, these functions would have something consistent to prevent And, of course, it will also be easily accessible to the user/programmer, who may want to use it for various reasons! Thank you, Simon! |
Awesome stuff guys! And Great job with the "ETC Transpose Calculator" @ammatwain, I love it ;) |
Thank you so much, @fablau Fabrizio! |
|
When there is an accidental, it is not remembered for subsequent notes within the same measure.
This can leads to redundant naturals or missing sharps / flats.
As an example, the following was rendered by MuseScore:
Now when rendered by OSMD it looks as follows:
Which is not correct.
The text was updated successfully, but these errors were encountered: