Deleting key signatures?
What, if anything, is the "correct" behavior supposed to be if one deletes a key signature? I tried doing this as a quick way of taking a score written in Ab and using it as the basis for a new score in C (too lazy to actually create a template). When I deleted the Ab key signature in concert pitch from all the staves, I saw no key signature, and assumed it was now a score in C. But when I later turned off the Concert Pitch toggle, it transposed my wind parts by pitch but did not create a key signature as it normally would when transposing a score in C. This is exactly the behavior I've been wanting for some time - truly key-signature-less music in both concert and transposed forms. So if this is a feature, great!
Except that it seems to mess up accidentals in some cases - see below.
If the "open key signature" (no flats or sharps regardless of transposition) was already on the table to be fully implemented for 2.0 (I saw signs of this in a nightly build, but it didn't work as expected), you can probably treat this as a pretty low priority bug. Probably address it by disallowing the deletion of key signatures, as I assume that really isn't a cool thing to be doing. But if there wasn't already a plan to fully implement open key signatures for 2.0, maybe the current code could just be tweaked to work correctly when one does delete a key signature, and I'd be very happy.
I've attached a sample score to show the bug I'm noticing.
Viewed in concert pitch, there is a B at the start of bar 2 with a courtesy natural (this seem necessary to trigger the bug), and then a B flat immediately afterwards. Turn concert pitch off to see it transpose for alto saxophone correctly, with a key signature of A major, the B natural turning to G# and retaining its courtesy accidental, the Bb turning into a G with the necessary natural. Toggling back and forth preserve all this, which is a great improvement for 1.1 over 1.0.
But then, while in transposed mode, delete the A major key signature. You see the G natural lose its accidental, making it appear to be a second G#. But it still plays back properly (as G natural), and when you flip back to concert pitch, the flat sign appears on the second B. But no amount of toggling concert pitch will make the natural sign appear on the second G.
No doubt there are other "bugs" in the treatment of accidentals when one deletes a key signature, as one probably shouldn't be doing that anyhow. But if it turns out that this almost works, then fixing this would be a great thing!
Attachment | Size |
---|---|
Open Key.mscz | 1.59 KB |
Comments
Hmm, it seems I underestimated the problem. Not sure why this didn't affect me before, but I'm now seeing that even changing key signatures doesn't work as it expected. Using the same example as the above, don't *delete* the key signature after transposing, but simply drag a C major key signature to the first measures. You get the same result - missing accidental on the second B, and no key signature appears in concert pitch or when transposed.
Now, I know I've successfully done this before - rigged up the wind parts to display key signatures in concert pitch but no key signatures when transposed, and accidentals have displayed properly. What I can't figure out is why it worked before but isn't working now. Maybe it's that I usually don't enter courtesy accidentals until after transposing?
Anyhow, this is very bad, from my perspective. As I've said before, the worst kind of bug (worse than crashes): silently generating incorrect music. I'll wait to submit a bug while I try to figure out why this never happened before (or maybe it did, and I never noticed, in case, I've got some work ahead of me cleaning up...)
In reply to Hmm, it seems I by Marc Sabatella
Looking over my most recent large score, this doesn't seem to have been a problem. Still not entirely sure why, but I must have done things in a different order (like adding courtesy accidentals after changing the transposing and changing key signature), as it's totally reproducible for me now.
For my current score, the workaround seems to be to select all, hit ctrl-up then ctrl-down which has the (usually unfortunate) side effect of deleting all courtesy accidentals, which then causes the bug not to bite. Doing this either before or after the change of the key signature is equally effective. However, due to a different bug in which accidentals are displayed improperly after a tie, this is not ideal as a workaround, because I was trying to get in the habit of entering courtesy accidentals on notes following ties immediately as the workaround for that bug, and those accidentals are lost as well. But I understand that bug may be fixed already.
Two more observations for anyone following this:
1. This only affects certain notes: notes that require an accidental in the original key but not in the new key (or vice versa). In my example, it was a Bb that required an accidental in C but not in Eb, and the B natural was the opposite. Had I used Db and D natural, there would have been no problem.
2. It does appear that simply deleting the key signature that appears after turning off Concert Pitch works pretty well aside from this bug. It's rather nice to be able to see my wind parts have no key signature whether in concert pitch or not. I'm still a bit reluctant to really rely on this, though.
Now that I think I understand what is going on, I'll be filing an issue right away.