Chord symbol entered after parts generated not transposed if score and part are at different concert pitch states

• Jul 27, 2014 - 22:55
Type
Functional
Severity
S4 - Minor
Status
closed
Project

I tested this with the latest 2.0 nightly build under Mac OS X 10.9.

Steps to reproduce:
- Create a score with two instruments, guitar and tenor sax. Create a part for each.
- Enter concert pitch mode
- Enter chord changes on the tenor sax part (I used F Gm7 F/A).
- Leave concert pitch mode. On the score, the chords are now G Am7 G/B, as expected.
- Click on the tab for the tenor sax part. While the notation is correct for Bb instruments, the chords are still in concert pitch (F Gm7 F/A).


Comments

Confirmed. The issue only affects chord added to the score *after* the parts are generated, and it only strikes if the score and part are at different concert pitch states when the chord is added. The chord is added to the part with the same root/bass (TPC) as the score.

BTW, note that the concert pitch state of score and parts are maintained separately, so you can have the score in concert pitch and parts transposed if you like. Meaning step 4 above ("Leave concert pitch mode") is not actually necessary here to reproduce the bug. Even if you leave the score at concert pitch, when you click the tab for the tenor sax part, it will be still have concert pitch off and will thus still show the bug.

Currently, Harmony objects don't share in the whole TPC1/TPC2 scheme. I suppose they could. Not sure if that's strictly necessary or not. I suspect it's possible to fix this without going through all that.

The problem in this case is here:

https://github.com/musescore/MuseScore/blob/master/libmscore/harmony.cp…

This is where the text of the just-entered chord is propagated to linked staves. We could calculate the difference between original and current transposition intervals right here and apply it to rootTpc and baseTpc.

However, there are other ways of creating Harmony objects, and we need to get those right too. There are a couple of different types of copy & paste. We already have code to get this right when the source and destination staves have different transpositions:

https://github.com/musescore/MuseScore/blob/master/libmscore/paste.cpp#…

But this still gets the parts wrong in the same way as when typing the chord directly, if the score and part are at different concert pitch states. I'm thinking we also need to get the transposition here:

https://github.com/musescore/MuseScore/blob/master/libmscore/undo.cpp#L…

There used to be a harmony properties dialog and also a palette element that could be used to add chord symbols, but those are gone now.