-
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
Improve laissez vib articulation placement #23392
Conversation
@Dima-S-Jr No. |
a2da50c
to
01e429b
Compare
@@ -385,6 +385,14 @@ void HorizontalSpacing::computeNotePadding(const Note* note, const EngravingItem | |||
} | |||
} | |||
|
|||
for (Articulation* a : note->chord()->articulations()) { |
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 is a bit hacky (and a bit of a performance concern as this is a very hot function). I think the better way to do this would be to add the shape of the LV articulation to its chord. That way, you can simply add to the padding table an Articulation->otherElement entry. At the moment, articulations are never added to segment shapes so LV will be effectively the only articulation item for which that entry is relevant (you can say that in a comment, there are a few other similar cases). In future, I'd like all articulations to be added to the chord shape (at the moment they aren't I think mostly because of skyline-related concerns), because wide articulations should be accounted for in horizontal spacing. When we do that, we'll think about how to specialize the padding for different articulation types
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.
Sorted - as articulations are layed out well after horizontal spacing is calculated, this required moving lv layout out of LayoutArticulations2
and to layoutPitched
and layoutTablature
.
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.
Excellent job
This PR improves the placement of laissez vib articulation symbols.