Articulations not appearing on grace notes
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project
New score. Add note, add grace note, add articulation (eg, accent) to the grace note. Result: it does not appear. The object debugger reveals it is present. I assume it simply isn't being laid out. See also #283157: Fingering numbers cannot be applied to grace notes. That one I clearly broke (and have now submitted a fix for) in 3.0.2. The articulation issue I might have broken a few months ago with some changes relating to placement of articulations relative to slurs, but it might be older than that...
Fix version
3.0.3
Comments
Thanks for difference it and fixing the fingering bug (I didn't check it with a nightly build). But for articulations it's a regression, because it works with v. 2.3.2. (but because grew up with piano, I'm not sure if articulations for grace notes are very common ;).
It's a regression indeed. Probably not a very common usage, but one that should work.
https://github.com/musescore/MuseScore/pull/4658
Tests fail for the PR because of questions over whether these articulations should be above or below. I will check with Behind Bars later, but suspect Gould might not be too explicit about this. Feel free to leave suggestions here...
Gould says, "where it will be most conspicuous", specifically suggesting avoiding the staff and giving a few examples but nothing really concrete.
Right now, the algorithm will choose to place most articulations outside the staff on the notehead side if there are no multiple voices. This is fine for grace notes some of the time but looks odd, I think, if the note is high up on the staff (or above it), as the fact that the stem is forced up for grace notes means placing the articulation below the staff results in it being very far away. So the first note here looks bad, while the second is OK:
So I'm thinking of forcing the articulation to the stem side if the note is "too far" from the bottom of the staff.
In reply to Gould says, "where it will… by Marc Sabatella
I would place the articulation with the same rule as stem directions in voice 1 only situations. (treble clef) notes on or above B get articulations above, notes below get articulations below.
This is more or less what I'm doing now, but the trick is that the rule for stem directions is different for grace notes - they are always up except for voice 2/4. So we can't simply follow the same rule as the stem. But I agree the end result should be similar, and how my current PR does it.
My reference point is sometimes Lilypond in such cases, see:
"A \grace music expression will introduce special typesetting settings, for example, to produce smaller type, and set directions. Hence, when introducing layout tweaks to override the special settings, they should be placed inside the grace expression. The overrides should also be reverted inside the grace expression. Here, the grace note’s default stem direction is overridden and then reverted.
Interesting! But of course, you can also override stem directions in MuseScore. I'm interested in what LilyPond does by default. Say, for the following example, which uses my current algorithm:
BTW, I chose to deviate from Gould's recommendation regarding the staccato - she says small articulations on the staff are too hard to see, but I'm not sure I agree, and in any case we don't do the same for other small notes. Would be a simple change, though, to make all small notes behave similarly here. Also to handle normal notes high on the staff whose stems happen to have been flipped up in the same way I handle grace notes. But I was aiming for consistency and not changing more than necessary in terms of existing behavior.
I don't think, you're asking about stem directions in general (LilyPond seems to handle it in a same way as MuseScore: http://lilypond.org/doc/v2.18/Documentation/notation/inside-the-staff.h…), but for rules of stem directions with grace notes (http://lilypond.org/doc/v2.18/Documentation/notation/special-rhythmic-c…). I'm not sure if it's explained exactly somewhere, maybe I or somebody other could transcribe your example with LilyPond.
Concerning staccato: In my opinion it should be handled in the same way as using small notes/a small staff (When it's difficult to see inside grace notes, would is also be difficult to see it inside an ossia staff resp. visa versa?).
Right, and that's how I have it - we don't do anything different according to staff size. we could, but then, what would the threshold be at which we make the change? Would it only depend on staff scaling or also on the overall spatium? And so on It's a huge can of worms I don't think we should open just to get articulations on grace notes working.
I'm still curious about the default articulation placement in LilyPond for the example I posted, though.
So played around a little bit with LilyPond (after a long time, not sure if I typesetted all correct).
Example 1, I didn't change anything, not the stem direction not the placement of articulations:
Example 2, I changed the stem direction for grace notes with accents, but leaving the placements for articulations by default:
Example 3, I didn't change the stem direction, but changed the placement for accents in measure 1:
Btw. the rules for stem direction of grace notes by "essential dictionary of music notation" (Gerou/Lusk): "Place the stem up regardless of the main note's stem direction (except when two parts share a staff)."
Hah, based on that first image with all defaults, this looks to be one of the few cases where we will be able to say we do better than LilyPond!
FWIW, there has never been any question in my mind about grace note stem direction, not sure how that entered into the discussion. My concern here is only about the articulation position given default stem direction.
In reply to Hah, based on that first… by Marc Sabatella
Marc, you started the stem directions discussion because you didn't understand my post. My suggestion was to make the articulations be above the grace note if its above B or below the grace note if it's below B. In other words use the same rule as you do for stems on normal notes in voice 1.
But isn't it a question? By adding an accent to a "normal" note, isn't the accent always placed to the note head and not to the stem by default?
In this way something similar as example 2 of my last comment should be the default (?).
See also the extract from the Lilypond-handbook above: "...A \grace music expression will introduce special typesetting settings, for example, to produce smaller type, and set directions..."
Maybe I find time to discuss this topic about rules of accents with grace notes inside the LilyPond-forum too (or someone other ;-).
FWIW, I'm pretty sure I understood the suggestion about using a similar algorithm for accent placement on grace notes as for stem direction on normal notes, but it is very clear I didn't do a good job of explaining in my response. Anyhow, no matter, I think we can all agree that the results seem good? While accents normally go to the notehead side, this clearly does not make sense for grace notes, as LilyPond's rendering shows. That's why Gould explicitly say to place as close to the note as possible and gives examples where the articulation is to the stem side, as I have it.
Concerning your PR? I didn't test it, because I don't using self-builds, only nightly versions. But as far I can see from your image, it's worth for a fix/a merge (maybe meanwhile;) - so I agree. The bug/regression should be fixed and it looks much better as with MuseScore 2.3.2.
When I find some more resources about the interrelationship between accents and grace notes, I'll reply.
Fixed in branch master, commit 558bfe0b4d
fix #283732: articulations not laid out on grace notes
Fixed in branch master, commit 9202c93aa8
_Merge pull request #4658 from MarcSabatella/283732-grace-articulation
fix #283732: articulations not laid out on grace notes_
Fixed in branch 3.0.x, commit 116731601c
_Merge pull request #4658 from MarcSabatella/283732-grace-articulation
fix #283732: articulations not laid out on grace notes_
Automatically closed -- issue fixed for 2 weeks with no activity.