Skip to content

Chord symbol parentheses improvements #29275

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

Merged
merged 4 commits into from
Aug 19, 2025
Merged

Conversation

miiizen
Copy link
Contributor

@miiizen miiizen commented Aug 15, 2025

Resolves: #29250
This PR includes parentheses in the chord symbol shape for horizontal spacing and improvements to parenthesis placement and shape.
image

@miiizen miiizen requested a review from its-not-nice August 15, 2025 09:12
@its-not-nice its-not-nice requested a review from mike-spa August 15, 2025 11:44
@its-not-nice its-not-nice added the vtests This PR produces approved changes to vtest results label Aug 15, 2025
ldata->midPointThickness.set_value(ldata->height / 60 * ldata->mag()); // 0.1sp for a height of 6sp
ldata->startY = top;
ldata->height = height;
ldata->midPointThickness.set_value(ldata->height / 20 * ldata->mag() * std::pow(scale, -0.5));
Copy link
Contributor

Choose a reason for hiding this comment

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

I know that the rationale behind these formulas is simply "what makes them look good". But, forgive my nitpicking

  • let's make a constexpr for that 20, something like HEIGHT_TO_WIDTH_RATIO
  • writing scale to the power of -0.5 is the same as writing 1/sqrt(scale), which looks a lot less arcane

ldata->midPointThickness.set_value(ldata->height / 20 * ldata->mag() * std::pow(scale, -0.5));
ldata->endPointThickness.set_value(endPointThickness);

double shoulder = 0.2 * std::pow(ldata->height, 0.99) * std::pow(ldata->mag(), 0.1) * std::pow(scale, -0.5);
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Same comment about the power of -0.5
  • Joke goes that for an engineer pi and 3 are the same number, which means for me height to the power of 0.99 is literally the same thing as height 🤣. Silliness aside, that looks very weird and I'd be surprised if it makes an even vtest-detectable difference

@mike-spa mike-spa merged commit d97031a into musescore:master Aug 19, 2025
12 of 13 checks passed
miiizen pushed a commit to miiizen/MuseScore that referenced this pull request Aug 19, 2025
Chord symbol parentheses improvements
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.

Improve parenthesis shape
3 participants