Hairpin should not cross barline by default
As per Gould, a hairpin that continues through the end of a measure should stop before the barline. We currently do this unless there is a dynamic marking at the start of the next, in which case we stretch to meet it. This was an unintended (I believe) side effect of the code meant to shorten hairpins as needed. Workaround is to manually adjust or to disable autoplace, but you hate to have to do either as this has other effects.
Actually, Gould does recommend stretching the hairpin across the barline if the first note is "some distance" after the barline, such as when there is a key or time signature change there. We could consider doing this always in case of key or time signature, or we could have a distance threshold, perhaps as a style setting.
Comments
I like the idea of a distance threshold as a style setting. This would allow anyone wanting all hairpins to cross the bar line to make that happen by changing one item.
On a similar note, a dynamic following a barline may be too far to the left. See #279452: Smart Layout/autoplacement does not detect barlines.
Fixed in branch master, commit 041a4afe87
fix #280208: hairpin should not normally cross barline to meet note
Fixed in branch master, commit ee0f8ca782
Merge pull request #4432 from MarcSabatella/280208-hairpin-barline
fix #280208: hairpin should not normally cross barline to meet note
Automatically closed -- issue fixed for 2 weeks with no activity.
Is there a way to prevent the hairpin from crossing the barline, even when there is a key change? I'm having a hairpin cross the line when it look neater if it didn't. If it was more than two sharps/flats I could understand it being necessary to cross the line, but it's one sharp, and it's only crossing the line by millimetres. I'd rather have the option to just end it before the barline.
Edit: didn't mean to change the "workaround" status of the post. I'm not sure how to fix that now.
In reply to Is there a way to prevent… by jscaranomusic
I found how to adjust the setting. Format -> Style -> Hairpins -> Autoplace, distance to dynamics
That's actually different - it literally controls the distance from hairpin to dynamic across the board. If it affects the threshold at which MuseScore extends a hairpin to close the gap, that's more of just an indirect coincidental effect.