-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Remove hanging ties on XML import #22455
Conversation
Backport of musescore#22455, which in turn is a port of musescore#8556 (which got ported to 3.7 earlier), but doesn't replace hanging ties with l.v. articulations, opting instead to simply delete them pending a proper feature.
ae14d84
to
383b8bf
Compare
Backport of musescore#22455, which in turn is a port of musescore#8556 (which got ported to 3.7 earlier), but doesn't replace hanging ties with l.v. articulations, opting instead to simply delete them pending a proper feature.
383b8bf
to
2acfc94
Compare
return; | ||
} | ||
|
||
auto chord = note->chord(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of "auto". I use it only for complicated types like iterators etc, but when the type is as simple as Chord*, better make it explicit
if (el && el->isChord()) { | ||
Note* matchingNote = toChord(el)->findNote(unterminatedTieNote->pitch()); | ||
if (matchingNote && matchingNote->tpc1() == unterminatedTieNote->tpc1() | ||
&& matchingNote->tpc2() == unterminatedTieNote->tpc2()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need to check both tpc1 and tpc2. As far as I know, the first is the concert pitch version, the latter is the transposed version: if one is equal, the other must be equal too. Perhaps you can simply use note->tpc(), which will choose by itself
2acfc94
to
fec6551
Compare
Backport of musescore#22455, which in turn is a port of musescore#8556 (which got ported to 3.7 earlier), but doesn't replace hanging ties with l.v. articulations, opting instead to simply delete them pending a proper feature.
Backport of musescore#22455, which in turn is a port of musescore#8556 (which got ported to 3.7 earlier), but doesn't replace hanging ties with l.v. articulations, opting instead to simply delete them pending a proper feature.
This PR ports some of #8556, but doesn't replace hanging ties with l.v. articulations, opting instead to simply delete them pending a proper feature.
The PR also limits the length of ties. Ties ending in a different bar will only be connected if there are no intermediary notes or rests in a voice which avoids this case (the final A has a tie ending tag).
Dolet 6 doesn't export cross stave information which can lead to unterminated ties. We search for these cases, and if found create cross stave ties: