Broken beams direction

• Sep 1, 2015 - 09:07

Hello to everybody.
While I was reading and testing the code to understand how to properly implement the export of beams and sub-beams to MusicXml (I found that the function Groups::beamMode is the one needed in this case), I stumbled upon a behavior which I do not know if it correct.
See this image:
beams.png
Are the broken beams at the beginning of the sub-beams (circled in red) pointing correctly?

Ciao,
ABL

EDIT:
I forgot to say: MuseScore 2.0.2, Windows 8.1


Comments

I assume you manually changed those beams using different combinations of sub-beam options? Clearly, that would be wrong in any normal situation, but sometimes as we say, garbage in, garbage out.

Basically, the code for drawing partial beams is is a hodge-podge of special cases designed to deal with real-world situations well. See Beam::layout2(), in particular, the following code:

https://github.com/musescore/MuseScore/blob/709e1ed3459ba3a7d7897f542a8…

Assuming you deliberately set the second 32nd of the second group to "Beam 32nd sub", then the direction of the broken sub0beam on the first 32nd of that group appears correct to me. You have specifically asked that the third beam not be drawn between the first and second notes of that group, so it is not. Realistically, combining that with the "Beam 16th sub" on the first note of the group (the default) is the "garbage in" I refer to. You are basically telling MuseScore, "don't draw the third beam to the right of the first note, but don't draw the second beam to the left either". That's an untenable situation, so no wonder you get something that looks strange!

I assume there are similar explanations for the other cases.

In reply to by Marc Sabatella

Yes, they all come from two subsequent sub-beam-begin options.
Thank you for the explanation.
I had already found that part of the code and I think that in order to properly implement a faithful export of the broken beams (forward and backward hooks) to MusicXml we have to clone that part of the code in exportxml.cpp. I just wanted to be sure that there were not known problems before cloning the code.

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