Triplet bars jumping above staff when cross-staff tuplets have beams joined together

• Nov 25, 2019 - 17:14
Reported version
3.3
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

Using a time signature with all notes beamed (examine the time signature in attached score) when you enter several triplets in a row, when you enter a note into the second (or later) tuplet, the bar and number jump various distances above the staff. In the attached score enter a note on beat 2 and you will see this. Notice that the bracket is where it's supposed to be, but because of auto placement, the staff is moved down quite a bit.

Changing the beaming so this note starts beaming will fix the problem as will setting the number and bracket to none (since it no longer exists) as does making the bracket and number invisible.

I have made this severity major because of where I found the issue. When the staff is far enough down on the page, the staff will move below the bottom of the page which makes it impossible to see what you are doing.

Attachment Size
triplet screen jumps.mscz 8.52 KB

Comments

Title Triplet bars jumping above staff Triplet bars jumping above staff when cross-staff tuplets have beams joined together

Not good. We are apparently calculating the position of the tuplet bracket very badly in this case. As far as I can tell, it happens only if the following are both true:

1) the tuplet does not start a beam group (that is, it is beamed to one or more previous notes)
2) one or more of those previous notes is cross-staff

I have updated the title accordingly, but I still don't know for sure if this is the only case or not. I fixed quite a few issues like this back in 3.1 but can easily believe that this case might have fallen through the cracks, or that it might have been broken by subsequent changes to beaming code.

Since there are no 3.x portables, it's quite difficult to see where the issue started unless you have cadiz1's library.

I do have some nightly builds that roughly correspond to some releases. But I'm pretty sure the bug has to do with the logic in the function isTopTuplet() and notTopTuplet() - functions designed to tell if a note is the start of a cross-staff tuplet. These functions simply aren't considering the possibility that a tuplet might be part of a large beam group and that we need to check those notes as well.

So it turns out there are a couple of other necessary conditions to see the bug:

3) none of the notes in the tuplet can be cross-staff
4) there must be a bracket