-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Score "loses" key signature when removing last instrument #18906
Comments
A simpler workaround that might help you would be to use "Replace Instrument" in the Instruments panel. What is happening is all instruments are removed before the new one is added, which also removes the initial key signature. @sammik maybe you can take a look at this. |
Same story if you delete all measures. To some extent this is by design and unavoidable, since the only place the key signature is actually stored is in the first measure of each instrument in the score itself, so if there are no measures or no instruments, there is nothing to tell MuseScore what the key used to be. I guess it could be fixed by just adding a global field to the Score object - and then make sure it's updated each time the key is updated, and manage it through transposition, local key signatures, etc. Not sure it's worth the trouble or risk, but maybe there is a more clever way I'm not seeing. |
Also, regarding workarounds - if you are often creating scores from Jazz Lead Sheet then changing the instrument to trumpet, simpler still would be to do that once, then just save the result to your Templates folder, and then from now on just select this template when creating a new core instead of the Jazz Lead Sheet template. |
So, this issue (regression from 3.6) is not just about initial key sig, but about whole key map - if there are more key signatures in score, all should be preserved. Problem is, key map is red from first staff, and if user removes all instruments in score and add another instruments, existing instruments are removed first, so there is no staff to read keylist for new staf from. I fixed this, PR on the way. But I think, there definitely should be property _keyMap (or _keyList?) in master score, same, as _timeMap and _tempoMap is. I propose, to create another issue (task) for masterScore.keyMap. |
…d diferent one in instruments dialog
fix #18906 preserve keyList if removes all instruments
Issue type
Engraving bug
Bug description
When using the
Add or remove instruments
dialog to remove and then add an instrument, the key signature is lost. I often do this when using the Jazz Lead Sheet template, to remove piano as the instrument and add Trumpet in Bb. In Musescore 3 a key signature which is already present (may have been selected in the new score wizard) is retained in the new instrument (with appropriate transposition).However in Musescore 4.1.1, the key signature is lost (i.e. becomes C Major/A minor concert, regardless of what was previously set)
Steps to reproduce
If you add a different instrument instead of Trumpet in Bb at step 3, it still ends up with a key signature of C major concert eg no sharps/flats for violin, 3 sharps for alto sax
Screenshots/Screen recordings
No response
MuseScore Version
4.1.1
Regression
Yes, this used to work in MuseScore 3.x and now is broken
Operating system
Linux
Additional context
Workaround: add instrument, close dialog, reopen dialog and remove the other instrument
may be related to #18590
The text was updated successfully, but these errors were encountered: