A key for changing note spelling more easily

• May 15, 2011 - 18:27

As you know, many notes have different possible spellings. Eg. in C major, all the "black keys" can either be spelled with flats or with sharps, ie. C#/Db, D#/Eb, F#/Gb, G#/Ab, A#/Bb, lowering or raising one of the seven keys in the scale (C,D,E,F,G,A,B) by one semitone. And no matter what (diatonic) key you are in, there are always five notes that need accidentals to be notated.

When entering notes using MIDI, MuseScore can only guess how a note with accidentals should be spelled. Often MuseScore will make a wrong guess (more often than not in my case). Let's say for instance that MuseScore notates you F# as a Gb. You can change the spelling by pressing down and then up (arrow keys), but that is not very intuitive, and the key sequence would be the reverse if you wanted Db and MuseScore gave you C# instead. A much simpler solution would be a key similar to the 'x' key that flips stems, but which instead "flipped" the spelling (whether the note is raised from the tone below it or lowered from the tone above it).

In case you don't see the relevance of such a feature, let me give you an example. I just entered a short piece (33 bars) by Bach, and I had to change the spelling no less than 60 times, or about twice per bar (almost all accidentals were sharps or canceled flats, and MuseScore automatically assumes they should be spelled with flats). If I were entering a whole suite or sonata, the number of spellings needed to be changed would be huge.

Pseudo-code:

function flip_spelling()
   if note belongs to the key/scale (eg. G in C major / Ab in Db major)
      do nothing
   if note is lowered a semitone from a tone in the scale  (eg. Gb in C major / Abb in Db major)
      change the note to the scale tone below and raise it (ie. F# in C major / F## in Db major)
   if note is raised a semitone from a tone in the scale   (eg. F# in C major / F## in Db major)
      change the note to the scale tone above and lower it (ie. Gb in C major / Abb in Db major)
end

Attached: the score I made, notated exactly as in my printed copy from Edition Peters (except for the layout, the angles of some of the beams, etc.)

Attachment Size
Siciliano by J.S. Bach.mscz 5.87 KB

Comments

I agree - luckily, there is already a flip enharmonic spelling command in the nightly builds. By default, it's hooked up to J as the keyboard shortcut, but like most, it's customizable.

In reply to by Marc Sabatella

I tried the enharmonic spelling (J) in trunk and it doesn't follow the algorithm described here. In C major, if you select a C and press J it will toggle between Dbb, B# and C. Is that useful enough or should it follow the given algorithm? Should I try to port it as it for 1.X release?

On the same level, trunk support diatonic pitch changes via shift+up/shift+down but always follow C, D ,E F, G, A, B and adding natural if the key signature has sharps or flats. Is that a bug or a feature?

In reply to by [DELETED] 5

Is that useful enough or should it follow the given algorithm?

The current behavior is not optimal. Well, it happens to be just perfect for C major / A minor, but not for other keys. What MuseScore does now is to simply cycle through all possible spellings without considering the key signature. The only exceptions are the black keys, where it only cycles through two possible spellings (wisely omitting the spellings H##, Cbb, E## and Fbb).

The problem is that for most tonal music, only two spellings are relevant for notes outside the scale. Having to cycle through the third spelling can be a pain. In C major / A minor these notes are all on the black keys, so cycling through all spellings works fine (as MuseScore uses only two anyway). But let's say that you're notating a piece in G# minor. One of the chords you will encounter most often in this key is the D# major chord (the dominant, D# F## A#). You will be notating lots of F## 's, and MuseScore will make a wrong guess that you mean G natural. If you have to cycle through G natural -> Abb -> F## every time instead of just G natural -> F##, then you have to press 'j' twice as many times, even though the Abb spelling is completely absurd.

On the other hand, what happens when you press 'j' on a scale note is not so important. Luckily, MuseScore recognizes scale notes, so there's no need for the 'j' key in these cases. Alternate spellings of scale tones is very rarely needed. For simplicity, I suggested doing nothing. The current behavior for scale notes may be useful in a few very rare cases, but mostly not. Example: in C major, how often do you need a H#, Cb, E# or Fb? Not to mention Dbb, A## etc. While these are perfectly normal in other keys, they usually have no practical purpose in C major. I'm not sure which is better: to keep this functionality in case someone may find it useful someday (even though it makes little sense) or to do nothing.

So yes, I definitely think you should switch to my algorithm, at least for notes outside the scale. That would make notation easier.

In reply to by [DELETED] 5

Should I try to port it as it for 1.X release?

Yes please! :) (and preferably with the changes that I suggested)

On the same level, trunk support diatonic pitch changes via shift+up/shift+down but always follow C, D ,E F, G, A, B and adding natural if the key signature has sharps or flats. Is that a bug or a feature?

A bug. Definitely. What's the point in moving through C, D, E, F, G, A, B when you're in eg. C# minor or Eb major? Makes no sense. Moving through the scale given by the key signature makes perfect sense though, and is a feature that I would use a lot.

Do you still have an unanswered question? Please log in first to post your question.