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-55: Infer tempo text #8412

Merged
merged 7 commits into from Jul 22, 2021

Conversation

iveshenry18
Copy link
Contributor

@iveshenry18 iveshenry18 commented Jun 22, 2021

Resolves: ENG-55: Tempi incorrectly rendered as Stave Text

This PR includes commits for inferring tempo text that is incorrectly exported as staff text.

Sometimes tempo text is incorrectly exported as staff text, often in the
form "q = 60". This commit adds regex-based inferencing for this case,
converting the left side of the equals sign to the proper symbol, and
calculating the resulting tempo from the resulting symbol and the value
of the right side.

Sometimes tempo text with additional instructions is exported as two
separate directions. Previously, this was imported as a Tempo Text
element and a separate Staff Text element. This commit adds a function
to infer these cases and merge the text from the Staff Text element
into the Tempo Text.

This now adds inferring based on common tempo text words such as "rit"
and "accel". In the case that one of these is inferred, the underlying
tempo remains the same.

  • 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

@Jojo-Schmitz
Copy link
Contributor

rebase needed

@iveshenry18
Copy link
Contributor Author

Rebased!

@vpereverzev
Copy link
Member

one more time, pls :)

@iveshenry18 iveshenry18 force-pushed the ENG-55-infer-tempo branch 2 times, most recently from c319258 to fc9bc32 Compare July 7, 2021 00:46
Sometimes tempo text is incorrectly exported as staff text, often in the
form "q = 60". This commit adds regex-based inferencing for this case,
converting the left side of the equals sign to the proper symbol, and
calculating the resulting tempo from the resulting symbol and the value
of the right side.
Sometimes tempo text with additional instructions is exported as two
separate directions. Previously, this was imported as a Tempo Text
element and a separate Staff Text element. This commit adds a function
to infer these cases and merge the text from the Staff Text element
into the Tempo Text.
This now adds inferencing based on common tempo text words such as "rit"
and "accel". In the case that one of these is inferenced, the underlying
tempo remains the same.
This commit adds another case of tempo inference, which handles staff
text on beat 1 of a score (tick 0/1) that is above the staff and bold,
regardless of the presence of keywords.

NOTE: in doing so, it was highlighted in the testing that there is some
existing unreliable behavior with exporting hidden tempo markings. This
test has been temporarily disabled.
This commit changes the method by which Staff Text is checked for
boldness, using a slightly more robust regex.
Rather than looking for <b> in the XML text, this commit pulls isBold
directly from the MusicXML, future-proofing the tempo text inference
from potential changes to MuseScore's internal XMLText representation.
@vpereverzev vpereverzev merged commit 59c8d43 into musescore:3.6.2_backend Jul 22, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 22, 2021
Sometimes tempo text is incorrectly exported as staff text, often in the
form "q = 60". This commit adds regex-based inferencing for this case,
converting the left side of the equals sign to the proper symbol, and
calculating the resulting tempo from the resulting symbol and the value
of the right side.

Duplicate of musescore#8412, part 1
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 22, 2021
Sometimes tempo text with additional instructions is exported as two
separate directions. Previously, this was imported as a Tempo Text
element and a separate Staff Text element. This commit adds a function
to infer these cases and merge the text from the Staff Text element
into the Tempo Text.

Duplicate of musescore#8412, part 2
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 22, 2021
This now adds inferencing based on common tempo text words such as "rit"
and "accel". In the case that one of these is inferenced, the underlying
tempo remains the same.

Duplicate of musescore#8412, part 3
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 22, 2021
This commit adds another case of tempo inference, which handles staff
text on beat 1 of a score (tick 0/1) that is above the staff and bold,
regardless of the presence of keywords.

NOTE: in doing so, it was highlighted in the testing that there is some
existing unreliable behavior with exporting hidden tempo markings. This
test has been temporarily disabled.

Duplicate of musescore#8412, part 4
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 22, 2021
This commit changes the method by which Staff Text is checked for
boldness, using a slightly more robust regex.

Duplicate of musescore#8412, part 5
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 22, 2021
Rather than looking for <b> in the XML text, this commit pulls isBold
directly from the MusicXML, future-proofing the tempo text inference
from potential changes to MuseScore's internal XMLText representation.

Duplicate of musescore#8412, part 6
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 22, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 2, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 10, 2021
Sometimes tempo text is incorrectly exported as staff text, often in the
form "q = 60". This commit adds regex-based inferencing for this case,
converting the left side of the equals sign to the proper symbol, and
calculating the resulting tempo from the resulting symbol and the value
of the right side.

Duplicate of musescore#8412, part 1
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 10, 2021
Sometimes tempo text with additional instructions is exported as two
separate directions. Previously, this was imported as a Tempo Text
element and a separate Staff Text element. This commit adds a function
to infer these cases and merge the text from the Staff Text element
into the Tempo Text.

Duplicate of musescore#8412, part 2
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 10, 2021
This now adds inferencing based on common tempo text words such as "rit"
and "accel". In the case that one of these is inferenced, the underlying
tempo remains the same.

Duplicate of musescore#8412, part 3
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 10, 2021
This commit adds another case of tempo inference, which handles staff
text on beat 1 of a score (tick 0/1) that is above the staff and bold,
regardless of the presence of keywords.

NOTE: in doing so, it was highlighted in the testing that there is some
existing unreliable behavior with exporting hidden tempo markings. This
test has been temporarily disabled.

Duplicate of musescore#8412, part 4
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 10, 2021
This commit changes the method by which Staff Text is checked for
boldness, using a slightly more robust regex.

Duplicate of musescore#8412, part 5
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 10, 2021
Rather than looking for <b> in the XML text, this commit pulls isBold
directly from the MusicXML, future-proofing the tempo text inference
from potential changes to MuseScore's internal XMLText representation.

Duplicate of musescore#8412, part 6
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 10, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 23, 2021
Sometimes tempo text is incorrectly exported as staff text, often in the
form "q = 60". This commit adds regex-based inferencing for this case,
converting the left side of the equals sign to the proper symbol, and
calculating the resulting tempo from the resulting symbol and the value
of the right side.

Duplicate of musescore#8412, part 1
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 23, 2021
Sometimes tempo text with additional instructions is exported as two
separate directions. Previously, this was imported as a Tempo Text
element and a separate Staff Text element. This commit adds a function
to infer these cases and merge the text from the Staff Text element
into the Tempo Text.

Duplicate of musescore#8412, part 2
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 23, 2021
This now adds inferencing based on common tempo text words such as "rit"
and "accel". In the case that one of these is inferenced, the underlying
tempo remains the same.

Duplicate of musescore#8412, part 3
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 23, 2021
This commit adds another case of tempo inference, which handles staff
text on beat 1 of a score (tick 0/1) that is above the staff and bold,
regardless of the presence of keywords.

NOTE: in doing so, it was highlighted in the testing that there is some
existing unreliable behavior with exporting hidden tempo markings. This
test has been temporarily disabled.

Duplicate of musescore#8412, part 4
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 23, 2021
This commit changes the method by which Staff Text is checked for
boldness, using a slightly more robust regex.

Duplicate of musescore#8412, part 5
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 23, 2021
Rather than looking for <b> in the XML text, this commit pulls isBold
directly from the MusicXML, future-proofing the tempo text inference
from potential changes to MuseScore's internal XMLText representation.

Duplicate of musescore#8412, part 6
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 23, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
Sometimes tempo text is incorrectly exported as staff text, often in the
form "q = 60". This commit adds regex-based inferencing for this case,
converting the left side of the equals sign to the proper symbol, and
calculating the resulting tempo from the resulting symbol and the value
of the right side.

Duplicate of musescore#8412, part 1
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
Sometimes tempo text with additional instructions is exported as two
separate directions. Previously, this was imported as a Tempo Text
element and a separate Staff Text element. This commit adds a function
to infer these cases and merge the text from the Staff Text element
into the Tempo Text.

Duplicate of musescore#8412, part 2
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
This now adds inferencing based on common tempo text words such as "rit"
and "accel". In the case that one of these is inferenced, the underlying
tempo remains the same.

Duplicate of musescore#8412, part 3
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
This commit adds another case of tempo inference, which handles staff
text on beat 1 of a score (tick 0/1) that is above the staff and bold,
regardless of the presence of keywords.

NOTE: in doing so, it was highlighted in the testing that there is some
existing unreliable behavior with exporting hidden tempo markings. This
test has been temporarily disabled.

Duplicate of musescore#8412, part 4
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
This commit changes the method by which Staff Text is checked for
boldness, using a slightly more robust regex.

Duplicate of musescore#8412, part 5
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
Rather than looking for <b> in the XML text, this commit pulls isBold
directly from the MusicXML, future-proofing the tempo text inference
from potential changes to MuseScore's internal XMLText representation.

Duplicate of musescore#8412, part 6
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
Sometimes tempo text is incorrectly exported as staff text, often in the
form "q = 60". This commit adds regex-based inferencing for this case,
converting the left side of the equals sign to the proper symbol, and
calculating the resulting tempo from the resulting symbol and the value
of the right side.

Duplicate of musescore#8412, part 1
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
Sometimes tempo text with additional instructions is exported as two
separate directions. Previously, this was imported as a Tempo Text
element and a separate Staff Text element. This commit adds a function
to infer these cases and merge the text from the Staff Text element
into the Tempo Text.

Duplicate of musescore#8412, part 2
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
This now adds inferencing based on common tempo text words such as "rit"
and "accel". In the case that one of these is inferenced, the underlying
tempo remains the same.

Duplicate of musescore#8412, part 3
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
This commit adds another case of tempo inference, which handles staff
text on beat 1 of a score (tick 0/1) that is above the staff and bold,
regardless of the presence of keywords.

NOTE: in doing so, it was highlighted in the testing that there is some
existing unreliable behavior with exporting hidden tempo markings. This
test has been temporarily disabled.

Duplicate of musescore#8412, part 4
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
This commit changes the method by which Staff Text is checked for
boldness, using a slightly more robust regex.

Duplicate of musescore#8412, part 5
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
Rather than looking for <b> in the XML text, this commit pulls isBold
directly from the MusicXML, future-proofing the tempo text inference
from potential changes to MuseScore's internal XMLText representation.

Duplicate of musescore#8412, part 6
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.

None yet

5 participants