Fix custom key signatures
Looking at the code I see that for all custom key signatures we set a C key. which means that playback will not work properly, and also updating the accidentals, moving the keys up and down or transposing them would not work correctly.
I'm making this post to gather ideas about how these could be fixed.
If we were to fix key signatures only for the symbols that have TPC values (flat, double flat, sharp, double sharp), we could start storing the list of notes for each key instead of the key name itself (just how we store them for the standard keys in tpcByStepAndKey in pitchspelling.cpp). Then all operations would have to use the list of notes instead of the key itself. We could have KeySig support both versions so that we don't need to do all changes at once.
I don't know what a good solution would be if we would want to support all accidentals in the master palette list. We might have to add them to the TPC list.
Comments
It's really a feature request. Support for custom key signature is not implemented at all.
we could start storing the list of notes for each key instead of the key name itself
If we go this road, I would do it only for custom key sig. These are already stored as custom in the KeySig event. The _keySymbols list also already store symbol and position on the staff which is more or less the same that a list of notes.
Came up again at https://musescore.org/en/node/126341.
Again in https://musescore.org/en/node/154536
And again in https://musescore.org/de/node/175731
With the addition that such a custom key sig is wrong when applied to a staff with a non-G-clef, the accidentals stick to their line/space rather their pitch
Considering that sraduvictor hasn't been active at least the past 36 weeks, let's unassign it
This would be great if musescore would support custom key signatures and playback! Hoping this makes it into version 3.
See #5819: add support for playback of custom key signature and also #270517: Request for custom key signatures to adapt to clef