Cannot apply non-standard accidental to a note that is modified by another accidental

• Aug 9, 2013 - 11:08
Type
Functional
Severity
S4 - Minor
Status
closed
Project

If a note is indirectly modified by an accidental (i.e. key signature or a previous note in the same measure), applying an accidental that is not double flat, flat, sharp, double sharp, or natural creates a natural accidental instead of the desired accidental.

Steps to reproduce:
1) Create a score with a key signature of a few flats or sharps.
2) Insert a note that is affected by the key signature.
3) Apply an accidental to the note except double flat, flat, natural, sharp, or double sharp.

Or

1) Create two notes in the same measure and apply a double flat, flat, sharp, or double sharp to the first.
2) Apply an accidental to the second note except double flat, flat, natural, sharp, or double sharp.

Expected: Selected accidental appears to the left of the note.
Actual: Natural sign appears to the left of the note.

Interesting enough, if the first note is modified after the non-standard accidental is applied to the second note, or a key signature that affects that note is inserted, the accidental stays (but can't be changed).

MuseScore nightly R.4f8cdbb
Windows 8


Comments

OK, I can reproduce using those steps, which are different than those in the original report (no flats or sharps in key signature in your version).

1) create score in C
2) enter two G's into first measure
3) using toolbar, add double sharp to first
4) using toolbar, add sharp to second
5) using palette, add microtonal accidental to second

I've since also been able to reproduce using the original steps; not sure what I was doing wrong before.

OK, I can reproduce using those steps, which I guess are a variation of the second set from the original report.

1) create score in C
2) enter two G's into first measure
3) using toolbar, add double sharp to first
4) using toolbar, add sharp to second
5) using palette, add microtonal accidental to second

I've since also been able to reproduce using the original steps; not sure what I was doing wrong before.

I'm looking at this. I see why the accidental is not added and can fix that; I'm still sorting out what effect microtonal accideentals should have on subsequent note entry in that measure and how to achieve that.

Status (old) active patch (code needs review)

See https://github.com/musescore/MuseScore/pull/974

Regarding the commented-out code I mentioned in the PR, here is the issue:

Imagine a piece with no key signature, and you see three G's in a measure - the first with a sharp, the second with a microtonal accidental, and the third with no accidental:

microtonal.png

In both 1.3 and 2.0, the second note plays back as a natural; eventually it would be nice for it to play back with a microtonal adjustment. But the question for now is, what do you expect the pitch of the *third* note to be? Currently in 1.3, it would play as a sharp. That's because the microtonal accidental on the second note affects the playback of that note (making it natural) but does not affect the accidental state of the measure. So the sharp on the first note remains in effect when the third note is played. Whereas one might instead expect the microtonal accidental on the second note to carry through the measure just as any other accidental would, and thus expect the third note to play back the same way as the second. That is, ultimately both would play with microtonal adjustments, but for now, as naturals.

The code I have added (but commented out) implements the latter. I am reluctant to enable it, however, because it represents a change in behavior relative to 1.3 while not actually working "correctly" either (microtonal accidentals don't play back with mcirotonal adjustments). The change in behavior would not not just be to playback - it would also affect the appearance of the score. That's because a score that looks like the above in 1.3 would actually store "G#" as the pitch of the third note, but with this change, that would render with an explicit sharp. I suspect people are relying on the current behavior and are creating scores like the above knowing that a human musician would play the third note like the second even though computer playback plays it like the first. They would not welcome the appearance of the sharp sign on the third note.

I propose we wait to make this sort of change until we do actually support microtonal playback. Although if anyone is following all this and feels we should make the change, the code is there and works.

Attachment Size
microtonal.png 3.02 KB

Since the issue I raise just above is not really related to the original issue - which my PR does fix completely - I've started a discussion in the forum for the question of how microtonal accidentals should affect the accidental state for subsequent notes. Here is the forum thread:

http://musescore.org/en/node/26296