courtesy accidentals

• Mar 28, 2018 - 01:12
Reported version
2.1
Type
Functional
Severity
S5 - Suggestion
Status
closed
Project

I’m filing this as “bug” because it does not match my understanding of the role tag inside an Accidental tag in an .mscx file; if my understanding is incorrect, feel free to recategorise, but please do enlighten me on why I’d be incorrect.

This issue happens with both 2.1 and 2.2: the [role]1[/role] tag in the accidentals appears on accidentals that are not courtesy accidentals. I had previously thought that it appears on exactly these that are courtesy accidentals, defined as "if you delete the accidental, the pitch of the note it is set on does not change".

Test score attached. I used my script from http://mirsolutions.de/music/resources/courtesy.sh to add parentheses around accidentals with [role]1[/role] (angle brackets, but musescore.org is known to “eat” them), but two of them (in measures 1 and 4) are not courtesy.

If I edit the accidentals within the software, the role tag sometimes goes away, but if I remove all role tags, the software removes the entire accidental tag on the next save, so I can’t use this idea (“perhaps, if we remove all role tags, it will rewrite them correctly upon saving”) to work around the bug

Attachment Size
courtesy-bug.mscx 25.41 KB

Comments

If role is 0, the layout created the accidental. If role is 1, the user created the accidental. I do not think this directly corresponds to "if role is 1, it is a courtesy accidental".

Severity
Status (old) active needs info
Status active needs info

The general rule in MuseScore is tags are only written if the value of the field is different from the default. So in cases where 0 is the default, that tag doesn't get written. In cases where it is not the default, it does. Without knowing more about what you perceive the problem to be, I can't be sure what you are talking about, but I suspect there is no bug. MuseScore doesn' have a specific sense of "courtesy" accidental, just "generated" versus "user created". The user created ones could be for reasons other than courtesy; MuseScore doesn't care.

By generated in this context, I mean one that MuseScore can figure out for itself based on the pitch of the note. Anything you do that causes forces an accidental to be displayed when not actually necessary gets flagged as "user".

If I try to reproduce your example, I don't get the user flag, so I'm not sure what you did exactly. Could have been something that came from MusicXML import, I guess. But the odd parentheses - they seem out of place, as this natural is clearly needed - gives me another thought. Maybe the previous A was originally also an A natural, then you added the explicit natural on the second one as a courtesy, so it got marked as user, and then you added the parens, but then you changed your mind about the first A natural and changed it to A flat? That could explain what you are seeing. That's just a guess though. If you can give step by step instructions to reproduce this, I can say with more certainty.

Status (old) needs info closed
Status needs info closed

I’m closing the issue here, we had a discussion in IRC, turns out the role tag is for “any accidental that is not needed” at some point. We’re unclear how they got here, but the effect I desired is not achievable with this anyway, so… nothing to be done at this point.