Fix MusicXML ties resolved to have an ending note coming before its starting note #3538
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.
This PR is to fix the MusicXML tie issue introduced by #3334.
The current code sets the onset of each tie's starting note to -1 when the tie is still open at the end of each measure.
verovio/src/iomusxml.cpp
Lines 1766 to 1769 in 545f379
This is to make the onset comparison in
MusicXmlInput::MatchTies
returns true for notes in the adjacent measures.verovio/src/iomusxml.cpp
Lines 1752 to 1759 in 545f379
But #3334 runs this logic twice as follows, so for the second call to
MatchTies
, each open tie's starting note always has the onset -1, so the ties are resolved to have an ending note that comes before the starting note.verovio/src/iomusxml.cpp
Lines 1709 to 1710 in 545f379
This PR moves that -1 logic right under the two calls to
MusicXmlInput::MatchTies
.Here's an example that makes this problem.
Input data
Actual behavior after the fix
Render result:
All six ties must be rendered correctly.
Actual behavior before the fix
Render result:
Tie
#TC3
is not rendered correctly.MEI:
Log: