-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MU4] Fix staccato and tenuto appearing below notes when they shouldn't #10665
[MU4] Fix staccato and tenuto appearing below notes when they shouldn't #10665
Conversation
(beam-side articulations)
Added a bit of logic for ignoring manual adjustments to stem length, so things like this are possible: (this was fixed in #4711 -- I don't know why this broke somewhere along the way but this PR returns to the functionality 4711 added) |
Yeah, the differences are due to the anchor point not being respected, which this PR fixes |
OK, so it seems 3.x is not affected by th at all is seems, Even if I backport this PR to 3.x I can't spot any difference, not in those 3 vtests at least. |
Yes, this was a regression introduced in 4.0 development (likely connected with the new beam code somewhere). |
I see, thanks |
src/engraving/libmscore/chord.cpp
Outdated
if (_up) { | ||
y = downPos() - stem()->length() - userLen; | ||
if (beam()) { | ||
y -= score()->styleS(Sid::beamWidth).val() * _spatium * .5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line
score()->styleS(Sid::beamWidth).val() * _spatium * .5;
is present in 4 places. It is better to add a temporary variable for it and reuse the variable 4 times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay!
6a28552
to
65c683e
Compare
src/engraving/libmscore/chord.cpp
Outdated
@@ -3746,18 +3746,19 @@ void Chord::layoutArticulations() | |||
bool headSide = bottom == up(); | |||
qreal x = centerX(); | |||
qreal y = 0.0; | |||
|
|||
const qreal halfBeamSp = score()->styleS(Sid::beamWidth).val() * _spatium() * 0.5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_spatium()
should rather be _spatium
if (beam()) { | ||
y -= score()->styleS(Sid::beamWidth).val() * _spatium * .5; | ||
y -= halfBeamSp * beam()->mag(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't _spatium
(as part ot halfBeamSp
) already contain mag
? How is beam->mag()
different from mag
?
If really needed, should it not get added just once up where halfBeamSp
is defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, still my last question: why not doing this only once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess we could, but beam()
is not guaranteed to be non-null until the check, so we'd need to add another check where the definition is. I don't see it as too big of a deal though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const qreal halfBeamSp = score()->styleS(Sid::beamWidth).val() * score()->spatium() * 0.5 * (beam() ? beam()-> mag() : 1) ;
65c683e
to
11701a2
Compare
Before:
After:
There was just some non-direction-agnostic code in the laying out of certain articulations, so that's been fixed.