Note-tie positioned too low

• Feb 3, 2016 - 14:53
S4 - Minor
by design

Nightly d08e14c (4 Jan 2016) on Win 7 HP / MS 2.0.2 on Win 10.

The attached score was created from scratch. Notice that the note tie in bar 3 has been positioned too low. It's position can be restored by (1) deleting one of the notes (in the same voice) below it (2) Deleting both of the previous measures (with Ctrl + Del) or (3) Deleting the first measure and deleting just the notes in the new first measure.


Attachment Size
note_tie_too_low.mscz 10.2 KB


There is nothing wrong with the position of the tie. The algorithm for calculating tie position considers the length of the tie and its curvature in deciding whethere or not there is room to place it within staff lines. It also behaves differently depending on the number of notes in the chord. This is normal and correct.

Looks similar on the surface, but definitely very different. It's more similar to #88316: Slurs wrongly positioned in TAB when notes are set to "Above lines", but the tie positioning code for tab and standard staves differs. That was probably a case never really considered, but again, the code in the example at hand it functioning correctly.

FWIW, the tie positioning algorithm is not perfect of course, but it's fairly sophisticated. We look at the number of notes in the chord and the position of the note within the chord to determine direction and also whether the tie attaches above/below the notehead (for single note chords) to the side (for multi-note chords). We then look at the length of the tie (which is always forced to be a readable minimum) and the resulting curvature and whether the note is on a line or space to help decide it if the tie needs to be moved vertically to avoid a staff line. For two note chords, we force any such adjustments to be outwards; for chords of more that two notes, the adjustment is inwards. Probably a few other special cases I am forgetting.

The places we tend to *not* do well are multi-note chords with dots and/or seconds. There are existing issues for those cases (#45576: Tie on same side of staff/ledger line as augmentation dot = collision and #13702: Incorrect tie positioning).