Nested beams created

• Nov 23, 2019 - 16:08
Reported version
3.3
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

This beams 3_4.mscz is the file used for this video

nested beams.gif

To explain the video. I have a 3/4 time signature with all beams in the measure attached just because this takes the least work to fix beaming in the score. As you can see in the last measure I set the beam to middle so it will attach to the previous measure. When I set the last note in the second measure to start beaming, nothing seems to happen. When I set the third note in the second measure to middle beam, you get the nested beaming in the title, which should actually be a group of 2 followed by 2 groups of three. Setting the first note in measure 2 to middle beam restores sanity and properly groups the beams.

I tried to force a relayout, but this did not fix the issue. Saving closing and reopening the file does correct the display.

Things that make you say, "Huh?"


Comments

Severity S4 - Minor S3 - Major

Very strange. FWIW, it works if you break the beams first before creating the cross-barline beam. There are still a number of other glitches with cross-barline beams - most obviously when there is a line break involved of course, since we don't actually support that but do try to handle it gracefully. The handstands required to do even that - laying out beams in stages at different times in the layout - are probably responsible for what is happening here as well.

Individually, none of the glitches may be that major, but collectively, they are a concern and there should probably be an effort to look at them together. See also #285141: Beam across a system break can disappear, #290088: Cross-beam issue: beams come and go with the slightest change to unrelated parts of a score., #292487: When beam crosses barline, the stem is next to a dense chord (of seconds or less) instead of in the center, #282322: Short stems when notes are beamed across barlines, and of course #16278: Beaming notes over barlines and line breaks.

I should have emphasized that order of operation is important. I found the bug and decided to immediately report it before I forgot. I didn't even both with looking at the results of what would happen when I applied the system break before the third measure (this is a minimal excerpt and the original score has a new line there). When I apply the system break, the notes at the end of the system are as expected, but the ones on the new system are beamed as though they are not connected to the previous system. Beaming is something I haven't even looked at seriously in version 3 at all and I've never seen this result before. The other issues you (Marc) linked to should be revisited and updated as needed for the current release.

I just now continued entering the score I was working on and found two things. First, the bass line of the piano had the same rhythm but I had entered the system break prior to entering the notes and fixing the beaming. The nested beams were still created until I made the first note middle beam as with the above example. The second thing I noticed is that the beam for the last note appeared in the previous measure as well as where it belonged as opposed to the start of the system as has happened in the past.

The nested beam effect is indeed interesting, but it is important not to downplay the significance of the first error, since if setting the last note of the second measure to start beaming had a visible effect, the nested beam never would have happened. The only thing that changed in 74421ac was the method for determining when to call a1->removeDeleteBeam(false), and it seems I missed a case when it ought to be called. This patch seems to take care of the problem, and it just might be exactly what is needed, but I think I would like to revisit the whole thing after a good night's sleep.

Update: After getting some much needed sleep, I have found that my suggested patch is flawed. I will continue to work on this.

Pure curiosity: the etudes for saxophone shown in the gif, is it existing saxophone studies, or are you writing some? (I am myself a saxophonist :)

That is my original work. I was a saxophonist years ago and decided to write a little bit of (mostly) easy etudes for the sax. I'll probably put it on my account at some point.

Status PR created fixed

Fixed in branch master, commit b616cb97f2

_fix #297544: Nested beams created

Commit 74421ac inadvertantly removed an important case for when a ChordRest should be detached from its former beam. This commit adds that case back._

Fix version
3.3.3