stem lengths inconsistent in beamed groups of three or more repeated eighth notes

• May 10, 2015 - 13:59

inconsistent stem lengths.png

I'm not sure what's going on here. Something is causing repeated eighth notes - when beamed in groups of three or more - to have their stem lengths shortened by one full space unit.

I first saw it in compound time, but it doesn't seem dependent on time signature after all.

Note that the behavior is different for notes on lines, in which case the stems are not shortened.

2.0.1 in Windows 8.1.

Attachment Size
inconsistent stem lengths.mscz 4.37 KB


In reply to by Jojo-Schmitz

You are correct that it's not one full spatium after all, but the precise amount is beside the point.

I tried some transpositions, and only notes on top of the staff or the first space from the top - and notes on the bottom of the staff or the first space from the bottom - are so affected.

In reply to by Jojo-Schmitz

Then I think they would have noticed it anyway and are capable of calculating the exact amount.

The exact amount is irrelevant to me because, as an end user, the effect is jarring on the eyes one way or another. But for all I know, this is a deliberate effort to conform to one of Elaine Gould's guidelines of which I'm not aware.

Still, thanks for the correction...

In reply to by stevebob

The code for handling beam layout - including the length of the stems and angle of the beam - is perhaps the single most complex aspect of the code, I have found. It's based in part on an enormous table of "magic numbers" giving stem length / beam angle values for different specific combinations of notes, but then there are all sorts of adjustments applied depending on the number of notes on the beam, the number of beams, and other factors. What I tweaked recently were a few of the stem lengths / beam angles for specific combinations of notes - mostly pairs of two with a large difference in pitch.

The actual rules for beam layout given in Elaine Gould's "Behind Bars" and elsewhere are also very complex and highly subjective. Most of this code probably predates Gould's book; my guess it is based more on Ted Ross. Here is an article that explains more than you probably want to know, while leaving about as as many open questions as it answers:

But FWIW, I just did a check, and see that MuseScore is sort of consistent in that the same shortening happens for the space above the staff and top space of the staff, also the space below the staff and bottom space of the staff. That is, G & E as well as D & F for treble clef. In these cases and these cases only, beams consisting of 2 identical notes get longer stems than beams containing 3 or more identical notes.

Whether this is just an accident or the result of an interpretation of some specific guidelines in Gould, Ross, or one of the other canonical references, I cannot say.

In reply to by Jojo-Schmitz

Definitely the right ball park. But my sense is, the 2-note case is correct here - it yields stems the same length as ubeamed notes. If there is an issue, it is that the other cases get shortened. That is the clause starting at line 1223, with 12, l2, ll1, ll2, lll1, lll2, etc, the mysterious "ba" table, and the call to the adjust() function, which is perhaps where the real decision gets made, maybe.

In reply to by Marc Sabatella

> Whether this is just an accident or the result of an interpretation of
> some specific guidelines in Gould, Ross, or one of the other
> canonical references, I cannot say.

Because it differs from the behavior of 1.3, can it be inferred that it's deliberate? Or does even the fact that it applies to 'space' notes but not 'line' notes suggest that it's accidental? Or none of the above?

In reply to by stevebob

At this point, I say, "none of the above". It's really not at all clear. There definitely are reasons why code like this might apply to spaces not lines - the Ross "cardinal rule" about beams sitting on or hanging from staff lines would mean you'd potentially need different adjustments according to whether the notes are on lines or spaces to start with. But it's all very inscrutable to me.

In reply to by stevebob

Looks quite funny: take 3 eighth notes, E5 F#5 and not move the 3rd up starting at D5 an watch the stem of the E5 to toggle its length...

Yes, there maybe rules to apply to spaces and not lines and vice versa, but I don't see any good reason to treat the top and bottom space different than any others?

In reply to by Jojo-Schmitz

A similar thing happens in scales. Enter a C major scale in the treble clef in 8th notes starting at middle C in 4/4 time. It comes out in two beamed sets of 4 (at least it did for me) but the first beam's stems are a space shorter than the second beam's, even though the latter go above the staff where one might expect some shortening. Join the beams and the left end is on the top line (which looks much too high to me) and the right end is lower than before. Adjust the beam to go from D to C. Now separate it into two beams again and the left beam suddenly goes up sharply, almost a full octave although the notes go from C to F. Curiouser and curiouser.

Do you still have an unanswered question? Please log in first to post your question.