Transposing instruments do not have correct key signature when score created from template

• Jul 6, 2012 - 13:53
S5 - Suggestion

Musescore 0775f63
Windows 7 Pro 64 bit

Run Musescore
Create score from template
Select Uk Brass Band template

A score is created. All staves have an empty C major key signature, as expected
Click Concert Pitch (Which is not highlighted when score created)
The staves change to show key signatures of 2 flats and 3 flats (which is incorrect)

...A C major concert pitch brass band score should change to 2 sharps and 3 sharps

This can be corrected by adding the following xml tag to the style section of the template:



Apparently the forum doesn't accept typing in tags in angle brackets, so I am trying again using round brackets!


...You get the idea. Obviously angled brackets needed.

Status (old) active by design

I think you have misinterpreted the function of the COncert Pitch button.

Activating Concert Pitch Mode shows the actual notes which are being played by the instruments.

So in this case a score in C major would be playing in Bb or Eb depending on how the instrument transposes.

yes, but in that case, it seems that the New Score behavior is wrong. Surely if you specify D major as the ley for a new score in the wizard, you mean, C major concert for all instruments, regardless of whether you plan to display that score in concert pitch or not at first. So if Concert pItch is off by default in a template, you should see sharps in key signatures for the transposing instruments, changing to C major when you emable Concert Pitch. And if Concert Pitch is on by default, you should see aC major key signatures across the board, changing to sharps as appropriate when you turn off Concert Pitch. If a template does nott explicitset the Comcert Pitch state, I guess I'd expect MuseScore to start the new score in whatever mode you were currently in when you invokved the new score wizard, or else to use some sort of default. but in a y case, you should never end up in a situation where with concert pitch enabled, you see different key signatures in different instruments (unless of course you went out of your way to chane key signatures after the fact).

Status (old) by design active

Absolutely Mark,

On this occasion Churchorganist has not fully thought out or actually tried my report.

I haven't misunderstood what happens with concert pitch view, or misunderstood the transposition of brass instruments. I play a Bb instrument in a brass band every week.

I can tell you more about the bug.

If you try my original instructions with the brass band template in Musescore 1.2, and again in a 2.0 nightly, you will discover that they do not behave the same as each other.

Do it with 1.2, you will find that the score is created, showing all staffs with the C major key signature AND THE CONCERT PITCH BUTTON IS HIGHLIGHTED. Clicking the concert pitch button turns OFF concert pitch and displays the staffs in two and three sharps WHICH IS CORRECT.

Do it with the 2.0 nightly, you will find that the score is created again with all staffs in C major. This view should be the concert pitch view, because that is the only view that would put the Bb and Eb instruments in the same key signature BUT THE CONCERT PITCH BUTTON IS NOT SELECTED! When you do select the button the score switches to display staffs in flats, WHICH IS NOT CORRECT.

I have also told you a way to fix it. Take it or leave it

I read this forum regularly,but rarely bother to comment because I find that there is a pervading "Knowall attitude" from some people on here, which just makes me feel Why bother? I have made a few valid comments in the past and usually get shot down in flames with an 'Its by design' . To which if I had been bothered to reply, I would have said, THEN YOU SHOULD CHANGE THE DESIGN.

I only made my comment today because I was 100 % certain that it is inescapable that the behaviour of this template is incorrect in 2.0 nightlies.

Musescore is already a good programme. It might be a really great programme one day when some of the rough edges get rounded off.

Personally it will be a long time before I bother to contribute again. I shall return to lurking on the forum and let others report faults.

I think it was an honest mistake; you shouldn't take offense. And if you see more rough edges, you should continue to point them out - although you should also remain open to the possibility that some of it may really be just a misunderstanding on your part.

Anyhow, while adding a line to the templatw woild presumably work around the bug, I think it more important that the bug be fixed - the New Score wizard should do the right thing (as I described) regardless of what if anything the tempales sets "concert pitch" to.

Title UK Brass Band template lacks concertpitch tag UK Brass Band template does not load in concert pitch
Status (old) active patch (code needs review)

Fixed template attached.

It was not clear from the original post that the score was supposed to be in C major concert - I have amended the title to more accurately portray the problem.

Apologies for any confusion over the issue!

Attachment Size
UK Brass Band.mscz 3.22 KB

Template now committed to my local MuseScore repo.

Trying to work out how to get a pull request to get it into the main repository.

Pull request now sent.

The issue is that the template didn't set Concert Pitch mode.

Consequently a score set in C major in the Create Score Dialogue created staves for all instruments as transposed pitch.

Altering the template to set Concert Pitch mode rectifies that.

It does beg the question why didn't 1.2 behave this way - does it default to COncert Pitch mode??

Done just a litle more digging on this.

Using the UK Brass Band template from 1.2 in R53f6f8d does set Concert Pitch mode, whereas using the one from the nightlies template folder doesn't, so my guess is that the one from the Nigthlies set of templates was an earlier version which didn't include this.

SO I guess you can go ahead and commit that pull request.


If you read my comment in that other thread, you'll see that having the template set Concert Pitch merely works around the bug. The actual bug is that bad things happen if Concert Pitch is not set. I thonk it more important to fix that bug than to work around it in one template, which would still leave other templates open to the bug. On the ither hand, I have nothing against having any given template default to Concert Pitch mode, independently of whether the actual bug is fixed.

Hmm - just checked the template's behaviour in 1.2.

1.2 displays the transposed pitch key signature's for the key of C major when loading the template from 2.0

So MuseScore 2.0 isn't interpreting the template correctly.

It still could be the template that is the problem, bearing in mind that it was designed in 1.1, and the changes in format from 1.x to 2.0

When I have a minute or two I will try recreating the template from scratch in 2.0 and see if that fixes the problem.

That should indicate whether or not it is a bug in the code or not.

Status (old) patch (code needs review) active

I have now recreated the template from scratch, and can confirm there is something awry in the template handling code

The transposition is not going through from choosing the key to opening the score.

The fixed template I supplied is OK as a workaround for now, but the code does need looking at.

Title UK Brass Band template does not load in concert pitch Transposing instruments do not have correct key signature when score created from template

Title change to more accurately reflect tje problem.

Apparently, the transposition of key signatures is explicitly inhibited when creating scores from templates. In file mscore/file.cpp, function MuseScore::newFile(), line 550 says:
if (part->instr()->transpose().chromatic && !newWizard->useTemplate()) {

By commenting out the second clause of the test, key signatures are created with the correct transpositions for each instrument, observing the Concert Pitch on/off switch.

The change is small and easy, but there has to be a reason for adding that second clause. Anyone knows why?