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

[MU3 Backend] ENG-67, 69, 73, 74, 83: Staff Text inference clean-up #8678

Merged

Conversation

iveshenry18
Copy link
Contributor

@iveshenry18 iveshenry18 commented Jul 21, 2021

Resolves:

  • ENG-67: "From SHOW" text is rendered as Staff Text
  • ENG-69: "This music has been legally downloaded..." occasionally renders as Staff Text
  • ENG-73: Some scores with inferred credits also have normal credits
  • ENG-74: Credit inference regex can be more flexible
  • ENG-83: Header VBox formatting needs improvement

This PR includes commits for a set of similar issues regarding incorrectly exported staff text (<direction> elements) that should be header text.

See individual commit messages for detailed descriptions of the fixes.

  • I signed CLA
  • I made sure the code in the PR follows the coding rules
  • I made sure the code compiles on my machine
  • I made sure there are no unnecessary changes in the code
  • I made sure the title of the PR reflects the core meaning of the issue you are solving
  • I made sure the commit message(s) contain a description and answer the question "Why do those changes fix that particular issue?" or "Why are those changes really necessary as improvements?"
  • I made sure the commit message title starts with "fix #424242:" if there is a related issue
  • I created the test (mtest, vtest, script test) to verify the changes I made

@iveshenry18 iveshenry18 marked this pull request as draft July 22, 2021 21:54
@iveshenry18 iveshenry18 force-pushed the ENG-67-69-staff-text-inference branch from 54fcbc3 to 6c6b752 Compare July 22, 2021 23:25
@iveshenry18 iveshenry18 marked this pull request as ready for review July 23, 2021 05:19
@iveshenry18 iveshenry18 marked this pull request as draft July 27, 2021 23:55
@iveshenry18 iveshenry18 marked this pull request as ready for review July 28, 2021 16:00
Similar to credits, sometimes Dolet exports source information
("from ABC") as direction words near the beginning of the piece. This
commit adds a function for inferring these and adding them to the
header as a subtitle.
Dolet also sometimes incorrectly exports footers as direction words,
particularly "This music has been legally downloaded . Do not
photocopy." This commit throws out staff text with these contents.
This commit refines the regex for inferring credit directions. It
ultimately removes requirements for names (the part after the word
"by") due to the inordinate difficulty of writing strict regex that
catches all possible characters included in names. To mitigate false
positives, it clarifies/restricts the regex for the part before the word
"by". This compromise decreases the number of false negatives without
significantly increasing false positives.
Some scores specify header text both in the <identification> element
and in the incorrectly-exported staff text. The latter tends to have
more information, so this commit hides the former when the latter is
present to avoid redundancy.
Due to inferred (mis-exported) credits not having valid positioning
information, there were occasionally collisions with the title text.
This commit adds a reformatting function that runs at the end of the
import (if any inferred header text is present) that prevents these
vertical collisions.
This commit extends the cases covered by inferred subtitles. Also, it
extends this functionality to apply to Titles—some titles are multi-
line, where the second line is really a subtitle. This commit adds a
function to infer these, extract them from the title, and add them
as the subtitle.
This commit changes the vertical padding to 1.2 * the line height when
reformatting a header box with inferred credits or subtitles.
This commit adds credit inferring to the title text (similar to what
already exists for subtitles). It also adds and refines the inference
cases for both credits and subtitles.
@iveshenry18 iveshenry18 force-pushed the ENG-67-69-staff-text-inference branch from 038a148 to b6d183f Compare July 28, 2021 16:08
@vpereverzev vpereverzev merged commit cd0ea90 into musescore:3.6.2_backend Jul 28, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 28, 2021
Similar to credits, sometimes Dolet exports source information
("from ABC") as direction words near the beginning of the piece. This
commit adds a function for inferring these and adding them to the
header as a subtitle.

Duplicate of musescore#8678, part 1
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 28, 2021
Dolet also sometimes incorrectly exports footers as direction words,
particularly "This music has been legally downloaded . Do not
photocopy." This commit throws out staff text with these contents.

Duplicate of musescore#8678, part 2
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 28, 2021
This commit refines the regex for inferring credit directions. It
ultimately removes requirements for names (the part after the word
"by") due to the inordinate difficulty of writing strict regex that
catches all possible characters included in names. To mitigate false
positives, it clarifies/restricts the regex for the part before the word
"by". This compromise decreases the number of false negatives without
significantly increasing false positives.

Duplicate of musescore#8678, part 3
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 28, 2021
Some scores specify header text both in the <identification> element
and in the incorrectly-exported staff text. The latter tends to have
more information, so this commit hides the former when the latter is
present to avoid redundancy.

Duplicate of musescore#8678, part 4
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 28, 2021
Due to inferred (mis-exported) credits not having valid positioning
information, there were occasionally collisions with the title text.
This commit adds a reformatting function that runs at the end of the
import (if any inferred header text is present) that prevents these
vertical collisions.

Duplicate of musescore#8678, part 5
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 28, 2021
This commit extends the cases covered by inferred subtitles. Also, it
extends this functionality to apply to Titles—some titles are multi-
line, where the second line is really a subtitle. This commit adds a
function to infer these, extract them from the title, and add them
as the subtitle.

Duplicate of musescore#8678, part 6
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 28, 2021
This commit changes the vertical padding to 1.2 * the line height when
reformatting a header box with inferred credits or subtitles.

Duplicate of musescore#8678, part 7
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 28, 2021
This commit adds credit inferring to the title text (similar to what
already exists for subtitles). It also adds and refines the inference
cases for both credits and subtitles.

Duplicate of musescore#8678, part 8
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 29, 2021
Similar to credits, sometimes Dolet exports source information
("from ABC") as direction words near the beginning of the piece. This
commit adds a function for inferring these and adding them to the
header as a subtitle.

Duplicate of musescore#8678, part 1
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 29, 2021
Dolet also sometimes incorrectly exports footers as direction words,
particularly "This music has been legally downloaded . Do not
photocopy." This commit throws out staff text with these contents.

Duplicate of musescore#8678, part 2
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 29, 2021
This commit refines the regex for inferring credit directions. It
ultimately removes requirements for names (the part after the word
"by") due to the inordinate difficulty of writing strict regex that
catches all possible characters included in names. To mitigate false
positives, it clarifies/restricts the regex for the part before the word
"by". This compromise decreases the number of false negatives without
significantly increasing false positives.

Duplicate of musescore#8678, part 3
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 29, 2021
Some scores specify header text both in the <identification> element
and in the incorrectly-exported staff text. The latter tends to have
more information, so this commit hides the former when the latter is
present to avoid redundancy.

Duplicate of musescore#8678, part 4
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 29, 2021
Some scores specify header text both in the <identification> element
and in the incorrectly-exported staff text. The latter tends to have
more information, so this commit hides the former when the latter is
present to avoid redundancy.

Duplicate of musescore#8678, part 4
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 29, 2021
Due to inferred (mis-exported) credits not having valid positioning
information, there were occasionally collisions with the title text.
This commit adds a reformatting function that runs at the end of the
import (if any inferred header text is present) that prevents these
vertical collisions.

Duplicate of musescore#8678, part 5
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 29, 2021
This commit extends the cases covered by inferred subtitles. Also, it
extends this functionality to apply to Titles—some titles are multi-
line, where the second line is really a subtitle. This commit adds a
function to infer these, extract them from the title, and add them
as the subtitle.

Duplicate of musescore#8678, part 6
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 29, 2021
This commit changes the vertical padding to 1.2 * the line height when
reformatting a header box with inferred credits or subtitles.

Duplicate of musescore#8678, part 7
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 29, 2021
This commit adds credit inferring to the title text (similar to what
already exists for subtitles). It also adds and refines the inference
cases for both credits and subtitles.

Duplicate of musescore#8678, part 8
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 29, 2021
See musescore#8678, issue possibly caused by another commit though
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 29, 2021
See musescore#8678, part 3
Not sure whe this is needed all of a sudden?
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
Similar to credits, sometimes Dolet exports source information
("from ABC") as direction words near the beginning of the piece. This
commit adds a function for inferring these and adding them to the
header as a subtitle.

Duplicate of musescore#8678, part 1
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
Dolet also sometimes incorrectly exports footers as direction words,
particularly "This music has been legally downloaded . Do not
photocopy." This commit throws out staff text with these contents.

Duplicate of musescore#8678, part 2
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
This commit refines the regex for inferring credit directions. It
ultimately removes requirements for names (the part after the word
"by") due to the inordinate difficulty of writing strict regex that
catches all possible characters included in names. To mitigate false
positives, it clarifies/restricts the regex for the part before the word
"by". This compromise decreases the number of false negatives without
significantly increasing false positives.

Duplicate of musescore#8678, part 3
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
Some scores specify header text both in the <identification> element
and in the incorrectly-exported staff text. The latter tends to have
more information, so this commit hides the former when the latter is
present to avoid redundancy.

Duplicate of musescore#8678, part 4
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
Due to inferred (mis-exported) credits not having valid positioning
information, there were occasionally collisions with the title text.
This commit adds a reformatting function that runs at the end of the
import (if any inferred header text is present) that prevents these
vertical collisions.

Duplicate of musescore#8678, part 5
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
This commit extends the cases covered by inferred subtitles. Also, it
extends this functionality to apply to Titles—some titles are multi-
line, where the second line is really a subtitle. This commit adds a
function to infer these, extract them from the title, and add them
as the subtitle.

Duplicate of musescore#8678, part 6
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
This commit changes the vertical padding to 1.2 * the line height when
reformatting a header box with inferred credits or subtitles.

Duplicate of musescore#8678, part 7
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
This commit adds credit inferring to the title text (similar to what
already exists for subtitles). It also adds and refines the inference
cases for both credits and subtitles.

Duplicate of musescore#8678, part 8
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
See musescore#8678, issue possibly caused by another commit though
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
See musescore#8678, part 3
Not sure whe this is needed all of a sudden?
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
Similar to credits, sometimes Dolet exports source information
("from ABC") as direction words near the beginning of the piece. This
commit adds a function for inferring these and adding them to the
header as a subtitle.

Duplicate of musescore#8678, part 1
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
Dolet also sometimes incorrectly exports footers as direction words,
particularly "This music has been legally downloaded . Do not
photocopy." This commit throws out staff text with these contents.

Duplicate of musescore#8678, part 2
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
This commit refines the regex for inferring credit directions. It
ultimately removes requirements for names (the part after the word
"by") due to the inordinate difficulty of writing strict regex that
catches all possible characters included in names. To mitigate false
positives, it clarifies/restricts the regex for the part before the word
"by". This compromise decreases the number of false negatives without
significantly increasing false positives.

Duplicate of musescore#8678, part 3
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
Some scores specify header text both in the <identification> element
and in the incorrectly-exported staff text. The latter tends to have
more information, so this commit hides the former when the latter is
present to avoid redundancy.

Duplicate of musescore#8678, part 4
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
Due to inferred (mis-exported) credits not having valid positioning
information, there were occasionally collisions with the title text.
This commit adds a reformatting function that runs at the end of the
import (if any inferred header text is present) that prevents these
vertical collisions.

Duplicate of musescore#8678, part 5
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
This commit extends the cases covered by inferred subtitles. Also, it
extends this functionality to apply to Titles—some titles are multi-
line, where the second line is really a subtitle. This commit adds a
function to infer these, extract them from the title, and add them
as the subtitle.

Duplicate of musescore#8678, part 6
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
This commit changes the vertical padding to 1.2 * the line height when
reformatting a header box with inferred credits or subtitles.

Duplicate of musescore#8678, part 7
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
This commit adds credit inferring to the title text (similar to what
already exists for subtitles). It also adds and refines the inference
cases for both credits and subtitles.

Duplicate of musescore#8678, part 8
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
See musescore#8678, issue possibly caused by another commit though
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
See musescore#8678, part 3
Not sure whe this is needed all of a sudden?
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.

None yet

3 participants