-
Couldn't load subscription status.
- Fork 3k
[MU3 Backend] ENG-91: Fix parts with excessive hidden staves (and related issues) #8763
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
vpereverzev
merged 15 commits into
musescore:3.6.2_backend
from
iveshenry18:ENG-91-mozart-disaster
Aug 9, 2021
Merged
[MU3 Backend] ENG-91: Fix parts with excessive hidden staves (and related issues) #8763
vpereverzev
merged 15 commits into
musescore:3.6.2_backend
from
iveshenry18:ENG-91-mozart-disaster
Aug 9, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0a01616 to
cb067eb
Compare
8 tasks
eaccb93 to
36a75bb
Compare
f944310 to
2557919
Compare
Currently, MuseScore displays copyright metadata in a centered footer. This results in the information being displayed on every page, which is inconsistent with many published scores. This commit hides the footers on import and rather creates a VBox, populates it with the copyright metadata, and places it at the bottom of the first page (either below the first explicit pagebreak, or below the last system of the first page after an initial layout).
Dolet sometimes exports scores with up to 10 staves, most of which are hidden. Since MuseScore has a MAX_STAFF limit of 4, such scores are corrupted. This commit adds a mechanism for discarding these hidden staves in such cases. In doing so, it also must implement a mapping from MusicXML staff number to index in the Part's Staff list. Therefore, this commit also adds a function to MusicXmlPart that applies this mapping if present, or defaults to decrementing the value, and uses this function wherever the MusicXML staff number is read.
The best fix for the majority of excess-staff related issues is simply to increase the MAX_STAVES constant to accomodate them. This doesn't seem to cause any problems with MusicXML import. That said, since this variable is so ubiquitous and may be misused or hard-coded somewhere sneaky, and because this may cause performance reduction, I don't recommend this be ported to master without thorough testing.
|
rebase needed |
Previously, barlines would only span to 2 staves, even if the part had more staves. This commit changes that so all but the bottom staff has barLineSpan set to true if in the same part or group. This commit also ensures that multi-staff parts have braces by default, even if they are part of a group that doesn't have a bracket or brace. Also, this commit adds a small condition that prevents redundant brackets (which are sometimes exported by Dolet) from being imported. In the above fixes, many tests had to be tweaked to account for changes in the underlying data which mostly don't effect presentation.
When line and sign are not specified on a pedal element, they default to "no" and "yes" respectively. Previously, this was handled by adding Symbol elements for the "Ped." and "*" markings. These would layout poorly and were inconsistent with pedal markings added to the score manually. This commit better handles this default case, and also makes the corresponding changes to the export code to correctly handle such pedal markings.
This commit adds a map of ticks where print-object is specified for each staff. This map is then referred to when importing directions, throwing the direction out when a staff has been hidden. TODO: use this map in more places to enforce hidden staves (i.e. in note import).
This commit adds code to cleanupLayoutBreaks() that attempts to reduce the size of the copyrightVBox by 20% if it is present and there is page overflow
Dolet tends to erroneously export tab staves at 150% scale. This looks terrible (and less like the original Sibelius file), so this commit adds a check to the staff-size import code that checks for and ignores attempts to increase the scale of a tab staff.
5c99bbc to
eb40844
Compare
In MusicXML, instrument names and abbreviations aren't necessarily meant to be displayed in notation. Nonetheless, due to the instrument creation process on import this would occur, even in scores where part-name and part-abbreviation are set to "no". This commit fixes that, and to that end creates member functions of Part that change the name of EVERY instrument in the part (rather than just the first one).
This commit adds a mechanism by which automatically-added part braces only cover normal staves. More specifically, there is now a function that finds the largest contiguous span of non-hidden, non-small staves, and the brace is applied to that span of staves. Also, small and hidden staves no longer have spanned barlines. In pursuit of this, there are various utility functions added, as well as improved consistency with naming for mxmlStaff (1-based) and msStaff (0-based, may not include all mxmlStaff values).
Sometimes Dolet exports instrument changes erroneously as staff text. This commit adds a function for hiding these.
Previously, the VoiceList was indexed by QString. This caused incorrect voice ordering when there are more than 10 voices due to QString sorting issues (e.g. "1", "10", "11", "2", "3", etc.). This commit refactors the key to an int, since most exporters use ints as voices. For those that use non-int strings, that string is hashed to an int using qHash.
its-not-nice
approved these changes
Aug 9, 2021
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Aug 9, 2021
Currently, MuseScore displays copyright metadata in a centered footer. This results in the information being displayed on every page, which is inconsistent with many published scores. This commit hides the footers on import and rather creates a VBox, populates it with the copyright metadata, and places it at the bottom of the first page (either below the first explicit pagebreak, or below the last system of the first page after an initial layout). Duplicate of musescore#8763, part 1
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Aug 9, 2021
Dolet sometimes exports scores with up to 10 staves, most of which are hidden. Since MuseScore has a MAX_STAFF limit of 4, such scores are corrupted. This commit adds a mechanism for discarding these hidden staves in such cases. In doing so, it also must implement a mapping from MusicXML staff number to index in the Part's Staff list. Therefore, this commit also adds a function to MusicXmlPart that applies this mapping if present, or defaults to decrementing the value, and uses this function wherever the MusicXML staff number is read. Duplicate of musescore#8763, part 2
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Aug 9, 2021
The best fix for the majority of excess-staff related issues is simply to increase the MAX_STAVES constant to accomodate them. This doesn't seem to cause any problems with MusicXML import. That said, since this variable is so ubiquitous and may be misused or hard-coded somewhere sneaky, and because this may cause performance reduction, I don't recommend this be ported to master without thorough testing. Duplicate of musescore#8763, part 3
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Aug 9, 2021
Duplicate of musescore#8763, part 4
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 23, 2021
This commit adds code to cleanupLayoutBreaks() that attempts to reduce the size of the copyrightVBox by 20% if it is present and there is page overflow Duplicate of musescore#8763, part 9
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 23, 2021
Duplicate of musescore#8763, part 11, plus fixing a merge conflict
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 23, 2021
In MusicXML, instrument names and abbreviations aren't necessarily meant to be displayed in notation. Nonetheless, due to the instrument creation process on import this would occur, even in scores where part-name and part-abbreviation are set to "no". This commit fixes that, and to that end creates member functions of Part that change the name of EVERY instrument in the part (rather than just the first one). Duplicate of musescore#8763, part 12
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 26, 2021
Currently, MuseScore displays copyright metadata in a centered footer. This results in the information being displayed on every page, which is inconsistent with many published scores. This commit hides the footers on import and rather creates a VBox, populates it with the copyright metadata, and places it at the bottom of the first page (either below the first explicit pagebreak, or below the last system of the first page after an initial layout). Duplicate of musescore#8763, part 1
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 26, 2021
Dolet sometimes exports scores with up to 10 staves, most of which are hidden. Since MuseScore has a MAX_STAFF limit of 4, such scores are corrupted. This commit adds a mechanism for discarding these hidden staves in such cases. In doing so, it also must implement a mapping from MusicXML staff number to index in the Part's Staff list. Therefore, this commit also adds a function to MusicXmlPart that applies this mapping if present, or defaults to decrementing the value, and uses this function wherever the MusicXML staff number is read. Duplicate of musescore#8763, part 2
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 26, 2021
When line and sign are not specified on a pedal element, they default to "no" and "yes" respectively. Previously, this was handled by adding Symbol elements for the "Ped." and "*" markings. These would layout poorly and were inconsistent with pedal markings added to the score manually. This commit better handles this default case, and also makes the corresponding changes to the export code to correctly handle such pedal markings. Duplicate of musescore#8763, part 6, fixing an mtest, maybe due to skipped commits
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 26, 2021
This commit adds code to cleanupLayoutBreaks() that attempts to reduce the size of the copyrightVBox by 20% if it is present and there is page overflow Duplicate of musescore#8763, part 9
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 26, 2021
Duplicate of musescore#8763, part 11, plus fixing a merge conflict
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 26, 2021
In MusicXML, instrument names and abbreviations aren't necessarily meant to be displayed in notation. Nonetheless, due to the instrument creation process on import this would occur, even in scores where part-name and part-abbreviation are set to "no". This commit fixes that, and to that end creates member functions of Part that change the name of EVERY instrument in the part (rather than just the first one). Duplicate of musescore#8763, part 12
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 29, 2021
Currently, MuseScore displays copyright metadata in a centered footer. This results in the information being displayed on every page, which is inconsistent with many published scores. This commit hides the footers on import and rather creates a VBox, populates it with the copyright metadata, and places it at the bottom of the first page (either below the first explicit pagebreak, or below the last system of the first page after an initial layout). Duplicate of musescore#8763, part 1
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 29, 2021
Dolet sometimes exports scores with up to 10 staves, most of which are hidden. Since MuseScore has a MAX_STAFF limit of 4, such scores are corrupted. This commit adds a mechanism for discarding these hidden staves in such cases. In doing so, it also must implement a mapping from MusicXML staff number to index in the Part's Staff list. Therefore, this commit also adds a function to MusicXmlPart that applies this mapping if present, or defaults to decrementing the value, and uses this function wherever the MusicXML staff number is read. Duplicate of musescore#8763, part 2
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 29, 2021
When line and sign are not specified on a pedal element, they default to "no" and "yes" respectively. Previously, this was handled by adding Symbol elements for the "Ped." and "*" markings. These would layout poorly and were inconsistent with pedal markings added to the score manually. This commit better handles this default case, and also makes the corresponding changes to the export code to correctly handle such pedal markings. Duplicate of musescore#8763, part 6, fixing an mtest, maybe due to skipped commits
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 29, 2021
This commit adds code to cleanupLayoutBreaks() that attempts to reduce the size of the copyrightVBox by 20% if it is present and there is page overflow Duplicate of musescore#8763, part 9
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 29, 2021
Duplicate of musescore#8763, part 11, plus fixing a merge conflict
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 29, 2021
In MusicXML, instrument names and abbreviations aren't necessarily meant to be displayed in notation. Nonetheless, due to the instrument creation process on import this would occur, even in scores where part-name and part-abbreviation are set to "no". This commit fixes that, and to that end creates member functions of Part that change the name of EVERY instrument in the part (rather than just the first one). Duplicate of musescore#8763, part 12
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
May 12, 2022
Currently, MuseScore displays copyright metadata in a centered footer. This results in the information being displayed on every page, which is inconsistent with many published scores. This commit hides the footers on import and rather creates a VBox, populates it with the copyright metadata, and places it at the bottom of the first page (either below the first explicit pagebreak, or below the last system of the first page after an initial layout). Duplicate of musescore#8763, part 1
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
May 12, 2022
Dolet sometimes exports scores with up to 10 staves, most of which are hidden. Since MuseScore has a MAX_STAFF limit of 4, such scores are corrupted. This commit adds a mechanism for discarding these hidden staves in such cases. In doing so, it also must implement a mapping from MusicXML staff number to index in the Part's Staff list. Therefore, this commit also adds a function to MusicXmlPart that applies this mapping if present, or defaults to decrementing the value, and uses this function wherever the MusicXML staff number is read. Duplicate of musescore#8763, part 2
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
May 12, 2022
When line and sign are not specified on a pedal element, they default to "no" and "yes" respectively. Previously, this was handled by adding Symbol elements for the "Ped." and "*" markings. These would layout poorly and were inconsistent with pedal markings added to the score manually. This commit better handles this default case, and also makes the corresponding changes to the export code to correctly handle such pedal markings. Duplicate of musescore#8763, part 6, fixing an mtest, maybe due to skipped commits
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
May 12, 2022
This commit adds code to cleanupLayoutBreaks() that attempts to reduce the size of the copyrightVBox by 20% if it is present and there is page overflow Duplicate of musescore#8763, part 9
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
May 12, 2022
Duplicate of musescore#8763, part 11, plus fixing a merge conflict
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
May 12, 2022
In MusicXML, instrument names and abbreviations aren't necessarily meant to be displayed in notation. Nonetheless, due to the instrument creation process on import this would occur, even in scores where part-name and part-abbreviation are set to "no". This commit fixes that, and to that end creates member functions of Part that change the name of EVERY instrument in the part (rather than just the first one). Duplicate of musescore#8763, part 12
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Mar 5, 2023
Currently, MuseScore displays copyright metadata in a centered footer. This results in the information being displayed on every page, which is inconsistent with many published scores. This commit hides the footers on import and rather creates a VBox, populates it with the copyright metadata, and places it at the bottom of the first page (either below the first explicit pagebreak, or below the last system of the first page after an initial layout). Duplicate of musescore#8763, part 1
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Mar 5, 2023
Dolet sometimes exports scores with up to 10 staves, most of which are hidden. Since MuseScore has a MAX_STAFF limit of 4, such scores are corrupted. This commit adds a mechanism for discarding these hidden staves in such cases. In doing so, it also must implement a mapping from MusicXML staff number to index in the Part's Staff list. Therefore, this commit also adds a function to MusicXmlPart that applies this mapping if present, or defaults to decrementing the value, and uses this function wherever the MusicXML staff number is read. Duplicate of musescore#8763, part 2
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Mar 5, 2023
When line and sign are not specified on a pedal element, they default to "no" and "yes" respectively. Previously, this was handled by adding Symbol elements for the "Ped." and "*" markings. These would layout poorly and were inconsistent with pedal markings added to the score manually. This commit better handles this default case, and also makes the corresponding changes to the export code to correctly handle such pedal markings. Duplicate of musescore#8763, part 6, fixing an mtest, maybe due to skipped commits
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Mar 5, 2023
This commit adds code to cleanupLayoutBreaks() that attempts to reduce the size of the copyrightVBox by 20% if it is present and there is page overflow Duplicate of musescore#8763, part 9
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Mar 5, 2023
Duplicate of musescore#8763, part 11, plus fixing a merge conflict
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Mar 5, 2023
In MusicXML, instrument names and abbreviations aren't necessarily meant to be displayed in notation. Nonetheless, due to the instrument creation process on import this would occur, even in scores where part-name and part-abbreviation are set to "no". This commit fixes that, and to that end creates member functions of Part that change the name of EVERY instrument in the part (rather than just the first one). Duplicate of musescore#8763, part 12
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Nov 7, 2023
Backport of musescore#11953 Mu3 doesn't allow for staves to get hidden, only parts, at least that is what I guess to be the reason for the mtest failure, so need to adjust the newly added mtest file Also need to fix another mtest file which doesn't exist in Mu4, as it stems from (the backport of) musescore#8763, part 2, which never got ported to master.
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Nov 14, 2023
Backport of musescore#11953 Mu3 doesn't allow for staves to get hidden, only parts, at least that is what I guess to be the reason for the mtest failure, so need to adjust the newly added mtest file Also need to fix another mtest file which doesn't exist in Mu4, as it stems from (the backport of) musescore#8763, part 2, which never got ported to master.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves: ENG-91: Excessive hidden staves cause note import to fail
Dolet sometimes exports scores with up to 10 staves, most of which are
hidden. Since MuseScore has a MAX_STAFF limit of 4, such scores are
corrupted (and many other issues are introduced when there are parts
with greater than 2 staves).
This commit adds a mechanism for discarding these hidden staves in such
cases. In doing so, it also must implement a mapping from MusicXML staff
number to index in the Part's Staff list. Therefore, this commit also
adds a function to MusicXmlPart that applies this mapping if present,
or defaults to decrementing the value, and uses this function wherever
the MusicXML staff number is read.
In addition to this mechanism, this PR contains a commit that increases the
MAX_STAVES constant from 4 to 10. This particular commit probably ought
NOT be ported to master.
Also adds handling for staff-size, which is relevant to many scores with hidden staves
(where hidden staves are for ornament clarification).
Also, this fixes the handling of some corner cases involving part-group barline spanning and brackets/braces.
The spec is somewhat ambiguous about some of the defaults here, but these adjustments are
sensible and produce better results in many complicated scores.
Also, this adds a fix for default <pedal> handling, adding a Pedal element to the score
rather than Symbol elements, which fixes layout and playback issues.
Finally, this is built on the commit from #8447.