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-53: Horizontal spacer for FretDiagrams #8296
[MU3 Backend] Eng-53: Horizontal spacer for FretDiagrams #8296
Conversation
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed).
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future.
5ef8c57
to
a61047c
Compare
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate pf musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate pf musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate pf musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate pf musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
The 1st commit (ENG-34: Fix erroneous space created for melismas) causes a regression, visible on musescore.com too now, Sample score attached: lyrics-test.zip Now reported as issue #10286 |
This reverts the 1st part of PR musescore#8296, which is causeing a regression.
This reverts the 1st part of PR musescore#8296, which is causeing a regression.
This reverts the 1st part of PR musescore#8296, which is causing a regression.
This reverts the 1st part of PR musescore#8296, which is causing a regression.
This reverts the 1st part of PR musescore#8296, which is causing a regression.
This reverts the 1st part of PR musescore#8296, which is causing a regression.
This reverts the 1st part of PR musescore#8296, which is causing a regression.
This reverts the 1st part of PR musescore#8296, which is causing a regression.
Previously, melismas were treated the same as normal Lyrics in terms of horizontal spacing—they would cause a spacer to be added to the ChordRest to which they were attached, causing an unnecessary gap after the first note of a melisma. This commit prevents a melisma from adding a right spacer to their first ChordRest, and rather creates a right spacer on the last ChordRest of a lyric if necessary. In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the melismatic Lyrics that end on it. This change also solves the problem of said bool being untrustworthy (i.e. erroneously being changged to false when one of multiple melismas was removed). Duplicate of musescore#8296
This commit adds a case for including fretboard diagrams when creating horizontal spacing in the ChordRest::shape() function. In pursuit of this, it also extracts a calculateBoundingRect function from FretDiagram::layout(). NOTE: In order to allow "orphaned" FretDiagrams to still create space, the spacer is added to all staves. This is redundant in some cases, so a more performant solution may be desirable in the future. Duplicate of musescore#8296
This reverts the 1st part of PR musescore#8296, which is causing a regression.
Resolves: ENG-53: Fretboard diagrams need to create horizontal space
This adds a case for including fretboard diagrams when
creating horizontal spacing in the
ChordRest::shape()
function. Inpursuit of this, it also extracts a
calculateBoundingRect()
function fromFretDiagram::layout()
.NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.
This PR also includes the commit from #8176, as this is built on top of it.