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

Partially fix #294768: tremolos don't have cue size #6265

Merged
merged 2 commits into from
Jul 14, 2020

Conversation

Harmoniker1
Copy link
Contributor

@Harmoniker1 Harmoniker1 commented Jun 26, 2020

Partially resolves: https://musescore.org/node/294768.

This is because the mag() factor isn't taken into consideration.

Along with multiplying mag() in some places, I also created a new member function minHeight() for Tremolo class to calculate the effective height of tremolo strokes, that is, the height the strokes spread across a given vertical line, without multiplying spatium(), to resolve an issue of stem length (a bit longer than intended when direction is down and has single-note tremolo on it) which is not obvious in normal size but obvious in cue size. Several places are already using this effective height, so a separate function for calculating it is really convenient to use.

Commit #2: (resolves https://musescore.org/en/node/286504#comment-1011220)
Before:
image
After:
image

@Harmoniker1 Harmoniker1 changed the title Partially resolves: https://musescore.org/node/294768. Partially fix #294768: tremolos don't have cue size Jun 26, 2020
@Harmoniker1 Harmoniker1 force-pushed the cue-size branch 2 times, most recently from 3ce34b5 to 6df6e65 Compare June 26, 2020 10:01
This is because the `mag()` factor isn't taken into consideration.

Along with multiplying `mag()` in some places, I also created a new member function `minHeight()` for `Tremolo` class to calculate the effective height of tremolo strokes, that is, the height the strokes spread across a given vertical line, without multiplying `spatium()`, to resolve an issue of stem length (a bit longer than intended when direction is down and has single-note tremolo on it) which is not obvious in normal size but obvious in cue size. Several places are already using this effective height, so a separate function for calculating it is really convenient to use.
@Harmoniker1
Copy link
Contributor Author

vtest failures are intended.

@Jojo-Schmitz
Copy link
Contributor

For some strange reason a couple mtests crash

libmscore/tremolo.cpp Outdated Show resolved Hide resolved
Comment on lines +484 to +489

//---------------------------------------------------------
// layout
//---------------------------------------------------------

void Tremolo::layout()
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason you moved this whole function? This makes the diff larger, obscures what has actually changed, and reduces the benefit of git blame, all for no purpose.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because I want to make the two functions for single-note and double-note tremolos respectively be adjacent, rather than having this main layout() function in the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants