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

Fix #10441 - Omit lyrics extender line if too short #10471

Merged
merged 2 commits into from
Feb 18, 2022

Conversation

mike-spa
Copy link
Contributor

@mike-spa mike-spa commented Feb 6, 2022

Comment

Resolves: 10441

As discussed in the related issue, the extender line for lyrics should be omitted when too short, as it serves no purpose. See the screen capture attached for a quick look. The threshold value is now hardcoded to 1 sp as suggested by @oktophonie. In future, it probably deserves a dedicated style setting.

Screencast.2022-02-06.18.43.43.mp4

@@ -416,8 +416,14 @@ void LyricsLineSegment::layout()
}

// MELISMA vs. DASHES
static double minMelismaLen = 1 * sp; // TODO: style setting
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it shouldn't be static since sp isn't static either. But it could be const.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good point, it should be const. Though I think it can still be static: in this context it means that it is a property of the class, so it doesn't need to be reinstantiated by every lyricsLine object. Even if sp isn't static

Copy link
Contributor

Choose a reason for hiding this comment

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

I still think it can't be static. sp may be different every time this method is called, so minMelismaLen must also be initialized/updated every time. Now, it will be initialized the first time this method is called, but after that, the value will never change anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mmh, you're right. I was assuming that sp is always the same within a given score, but indeed it can change. Then the variable should just be a const double

@Jojo-Schmitz
Copy link
Contributor

I wonder why no vtest fails, seems to indicate no such too short melisma is part of the tests, but maybe it better should?

@mike-spa
Copy link
Contributor Author

mike-spa commented Feb 7, 2022

I wonder why no vtest fails, seems to indicate no such too short melisma is part of the tests, but maybe it better should?

Yeah, I guess it's a relatively rare occurrence, but it may be worth having it in the tests. In general, is there a handbook or something on how to create new tests? That's something I'd like to learn.

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Feb 7, 2022

Check https://github.com/musescore/MuseScore/blob/master/vtest/README.md#add-new-test and vtest/scores/lyrics-[1-9].mscx

Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 9, 2022
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 9, 2022
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 9, 2022
@RomanPudashkin RomanPudashkin merged commit ef09b1b into musescore:master Feb 18, 2022
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 24, 2022
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
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.

Lyrics: Extender lines can be too short.
5 participants