Incorrect key signature after toggling concert pitch on staff with instrument and transposition change at start

• Aug 1, 2021 - 13:39
Reported version
S3 - Major

When I open the attached file: everything is fine (see screenshot_01_...).
Then I press the button "transposed score" and everything is still fine (see screenshot_02_...)

Now when I switch back to concert score a new and incorrect key signature appears in the 2nd alto. (see screenshot_03)

From now on I can switch between both concert and transposed views as much as I want - this incorrect keysignature remains the same and is consistnt in both views (see screenshot_04_...)

A suggested work around of re-stating the key signature does work but has 2 disadvantages:
- I have to do it everytime a player changes the instrument mid-song
- the "new" key signature (that is the same as the old one) appears in all parts mid-song, thus creating unease and shakiness with the performers ("What is happening???" where there is nothing happening..)

I have not checked if this behavior exists only on parts with a change of instruments mid-song or if you get this misbehavior only with certain instruments, but it did occur a few times in my past scores.

Since I found a few similar issues in the issue tracker (but just not quite the same or with the same version of musescore), it looks like a fix of code would much be apprecheated by the community.


Title Incorrect keysignature after switching a few times between concert score and tranposed score Incorrect key signature after toggling concert pitch on staff with instrument and transposition change at start
Workaround No Yes

Confirmed. The trigger is, I think, the instrument change that involves a different transposition right at the very beginning. The code seems confused about which transposition to apply. Workaround is to simply change the primary transposition. In this case, temporarily remove the instrument change first, then change the transposition to major second, then re-add the instrument change.

There have indeed been other bugs in this area in the past, but most were fixed years ago. As far as I know this is the only report of this particular problem. Other open issues are not bugs so much as limitations in how transposition is handled. for example #302566: Key signature not restored correctly when toggling concert pitch which is specifically about the inability to remember which enharmonic spelling should be used when switching between flats and sharps. There is also a known issue that can come up in certain scores in which the key signatures have somehow become unlinked between score and parts, but that also is not related as there are no parts in this score.

Thanks for your hint.
I created a new stuff and set it to clarinet (instead of alto sax) and changed it later to alto sax. This works!

It still would be nice, if someone could have a look at the code, since I usaly use a template to start with and most likely will not remember everytime I start a new arrangement ... :-)

Indeed, it's a bug that should be looked at.

But to be clear, this will only be a issue for scores that involve doubling like this, and only when starting right out on the double, and only when that double has different transposition. And if it happens, no need to create a new staff, the workaround I gave fixes the problem more easily.