Skip to content
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

Beam / tremolo layout refactor #16223

Merged
merged 4 commits into from
Mar 22, 2023
Merged

Conversation

asattely
Copy link
Contributor

@asattely asattely commented Feb 6, 2023

Resolves: #15470

The idea of this PR is to factor out our fancy new beam positioning algorithm into its own class, which can be used by both beams and two-note tremolos. This doesn't change anything about beams, but rather radically changes two-note trems' behavior to use the beam layout algorithm.

@asattely asattely force-pushed the beam-refactor branch 5 times, most recently from 72105f0 to 7e1eebb Compare February 14, 2023 03:26
@igorkorsukov

This comment was marked as resolved.

@asattely asattely force-pushed the beam-refactor branch 6 times, most recently from 9e04765 to 68976e6 Compare February 22, 2023 20:06
@asattely asattely force-pushed the beam-refactor branch 14 times, most recently from 345b291 to 25f0e85 Compare March 1, 2023 03:41
@asattely asattely marked this pull request as ready for review March 1, 2023 04:54
@oktophonie oktophonie added vtests This PR produces approved changes to vtest results and removed vtests This PR produces approved changes to vtest results labels Mar 1, 2023
@asattely asattely force-pushed the beam-refactor branch 2 times, most recently from fe002d0 to 1bff2d2 Compare March 20, 2023 13:57
@RomanPudashkin RomanPudashkin removed the request for review from vpereverzev March 21, 2023 10:58
double y2;
};

class BeamLayout
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend moving this class to a separate file inside the engraving/layout folder

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All BeamLayout functionality moved out into beamlayout.cpp!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also move the declaration of this class into beamlayout.h. Both of these files (beamlayout.h/cpp) should be placed in engraving/layout

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done! moved both into beamtremololayout .cpp/.h

@asattely asattely force-pushed the beam-refactor branch 3 times, most recently from c0605db to fb99cdf Compare March 22, 2023 00:15
so that two-note tremolos can use it as well
The vast majority of these utest fixes are due to beam positions being able to occupy a floater space outside the staff if they slant away.

A few others add tremolo anchor point information which this PR added
@asattely asattely force-pushed the beam-refactor branch 2 times, most recently from bebc3d7 to 9cf89c5 Compare March 22, 2023 16:15
and rebase shenanigans for PR musescore#16719
@RomanPudashkin RomanPudashkin merged commit a66ac8d into musescore:master Mar 22, 2023
asattely added a commit to asattely/MuseScore that referenced this pull request Apr 11, 2023
computeUp can be called before the beam is laid out, so we need to do that if necessary
Eism added a commit that referenced this pull request Apr 11, 2023
@RomanPudashkin RomanPudashkin mentioned this pull request Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vtests This PR produces approved changes to vtest results
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MU4 Issue] Engraving of two-note tremolos is not ideal
4 participants