Transposition should use double sharps and double flats where appropriate

• Dec 19, 2014 - 13:53
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Trivial reproduce path:
1. Put a Gb chord in a C key, which is a lowered fifth degree in C.
2. Transpose to a Db key
3. Gb becomes G. (it should be Abb, which is a lowered fifth degree in Db)

Obviously, transposing back to C key ends up with a F# maj chord, because "G" in Db is an "augmented" fourth degree.

Other example:
Neapolitan chord is a major chord built on a lowered second degree. So, in Db major key it will be Ebb .
Now, if I transposed an Ebb chord from Db key to an Ab key, it becomes A-natural chord, which doesn't exist in Ab. Should be Bbb.

Is it here: https://github.com/musescore/MuseScore/blob/master/libmscore/transpose… ?

Win7, abbf2c8


Comments

Until a couple of weeks ago, we didn't support double flats or double sharps in chord symbols at all. So I guess the transpose code was hard-wired to ignore that option. There's actually a couple of places to fix, but it's easy; I'll get it soon.

Title Transposition of a chord to other key may need a double sharp or a double flat. Transposition should use double sharps and double flats where appropriate

Hmm. We currently don't use double flats or double sharps when toggling Concert Pitch either. Not for chord symbols, and not even for notes. We used to (for notes, anyhow) in 1.3, and I believe we still should.

I am working on a fix that takes care of all of these cases. Basically, I change all the calls to the transposeTpc() to pass in "true" rather than "false" for the "useDoubleSharpsFlats" parameter, except for the call in transposeKey(). Seems to work, but will test more before submitting.