B# and Cb octave change

• Jun 19, 2019 - 06:47
Reported version
3.1
Priority
P2 - Medium
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
PR created
Regression
No
Workaround
No
Project

After discussing this topic in the forum, seems it's definitely a bug.
(https://musescore.org/en/comment/928033#comment-928033)
OS: macOS Mojave (10.14),
Arch.: x86_64,
MuseScore version (64-bit): 3.1.0.22425,
revision: e26f7c4

When inserting a B# or a Cb into a score, Musescore names the note with the wrong octave.
e.g. a sharpened B3 becomes a B#4, and a lowered C5 becomes a Cb4.
Look at the status bar (see attached screenshots)
That is reflected in the exported musicXML file too (that's the reason I noticed this issue).
B.png B#.png
C.png Cb.png


Comments

Good call on the MusicXML, although chances are that would require a separate bit of code to fix. Not sure what context this is used in, but it suggests there might also be a corresponding situation where we need to fix import?

I'm looking at this (be patient I'm new at this). I'll ensure that the note name is displayed in the status bar correctly and export musicxml properly, I'm not far enough into the code to see if one thing will fix both or not. I'll open a second issue & PR if export is a different fix. We can revisit if import is an issue after the status bar is fixed.

Actually, I think MusicXML export/import gets this right already, which means we can use the same approach for determining which octave to show in the status bar. The fix would be as simple as this, which is based on these lines from the MusicXML export code.