Rehearsal marks are incorrectly positioned in case of repeat barline

• Apr 6, 2017 - 07:08
Type
Functional
Severity
S5 - Suggestion
Status
PR created
Regression
No
Workaround
No
Project

Rehearsal marks "attached" to the first note of a bar are aligned left, center or right to the left barline according to the selected text style for rehearsal marks (+special handling when right align is selected and bar is first of a line).
However, when the barline is a repeat barline instead of a simple one, the alignment is incorrect.
The problem occurs for left/center/right to repeat barline in a line, and center/left for repeat barline at beginning of line.
The special handling of right align when bar is first of line is correct.
See attached score (and see https://musescore.org/en/node/186001 for detailed explanation of Marc).

Attachment Size
testrehearsal.mscz 5.52 KB

Comments

Accidentals shouldn't affect anything. if you are looking at measure 9, it's the time signature that makes the difference, not the accidental (as measure 13 shows).

The decision to place rehearsal marks *after* the clef / key / time signature signature etc was deliberate after taking advice from numerous users and consulting numerous sources on proper notation. To be sure, it was far from unanimous, but this seemed to be the consensus. So that much is by design.

Start repeats are another matter. They confuse the code that is trying to determine where the alignment point should. That will, I believe, a very simple fix, to RehearsalMark::layout(). Where we test to see if this is the first segment of the measure (by testing s->prev()) and find it isn't, we need to check if the previous segment is a start repeat.

There is a bit of complication - the start repeat barline may belong to the current measure (the norm at the beginning of a system) or to the previous measure (the norm elsewhere). So actually we need to check both places, figure out what's what, and do the right thing from there. So not quite the one line fix I was hoping for. Still doable and in my opinion worth doing, and worth doing for 2.1 rather than later because it will introduce a (hopefully beneficial) layout change in scores that have this going on, and I'd rather get such changes over with now. But, we've also lived with it this long and to my recollection no one has commented on it before, so even though I agree the current behavior is wrong, it's doesn't seem to have been a big problem.

"...to my recollection no one has commented on it before..." Back when you fixed #63856: Rehearsal mark at beginning of system should stay within margins, I wasn't really happy with it, as it seemed to me to in most cases put rehearsal marks too far to the right.* This case was one of them, minor as it is, so if it's doable and there's no differing of opinions, I'd be grateful to see it fixed.

*I still want them to be center-aligned instead of left-aligned to that point after the system header, though I also still appreciate that the specific problem of staying within the margins is fixed.

Not quite sure what you mean. Center-aligned rehearsal marks *are* centered on on the point right after the system header. Try creating arbitrarily long rehearsal marks and you'll see. I think what you are really experiencing is that the point we are aligning to is further to the right than you might prefer. It's not *immediately* to the right of the time signature, but instead accounts for the "Clef/key signature right margin" (Style / General / Measure).

So, for instance, the following shows the margin set to 0, and should demonstrate clearly we really are centering on the point to the right of the header:

rehearsal-center.png

Anyhow, if you look at the examples you posted in https://musescore.org/en/node/63856#comment-401656, and really examine where the alignment point is (the true center of the rehearsal mark), you'll see two of them come *immediately* after the header but two come after a margin. And if you go back to IMSLP and check more examples, you'll see - as I said before - results all over the map*. So there really isn't a standard here, but what we currently do is completely within the realm of normal.

*When I say "all over the map", here are some fo the first few examples I encountered:

The first two I found actually put rehearsal marks after the clef but before the time signature:

http://javanese.imslp.info/files/imglnks/usimg/5/56/IMSLP65143-PMLP0354… - see letter "G"

http://ks.imslp.info/files/imglnks/usimg/3/39/IMSLP31146-PMLP56324-Moza… - see letter "M"

The next one I saw puts it directly over the key signature in one case, but way to the right in other cases:

http://ks.imslp.info/files/imglnks/usimg/7/76/IMSLP281065-PMLP13306-Sch… - see letter E, but then G, H, K

These two do exactly what we do - centering after not only the header, but a reasonable margin:

http://imslp.eu/files/imglnks/euimg/4/40/IMSLP299507-PMLP03667-Ravel-Bo… - see 15

http://ks.imslp.info/files/imglnks/usimg/d/d3/IMSLP38170-PMLP02723-Tcha… - see M

So again, lots of variations, but centering to a point that isn't *immediately* after the header but instead incorporating a reasonable margin seems to what over half the examples do.

Given the intended schedule for 2.1, I'm thinking it does *not* make sense to change this at this point. Existing scores with manual adjustments made to account for the current behavior would be adversely affected. I think that is too high a price to pay to reduce the need for manual adjustments in future scores just for this specific case (rehearsal marks on start repeats). 3.0 will come with much bigger layout changes, no reason not to look at it for there, but probably not before. Again, my feelings might be different if there were lots of complaints about this, but there haven't.

Thank you clarifying! Interesting that on ordinary measures it does not go after the "Barline to note distance." Anyway, I hope by the time 3.0-dev is nearer I'll have the skills to work on this myself.

On ordinary measures, we specifically programmed it to align directly over the barline, because that is what the standard engraving practice is. Only for measures with a header did we program it to align with a point after the margin.

So as far as I can tell, except in the case of start repeat signs, we always follow standard engraving practice currently by default: centered over the barline for ordinary measures, centered over a point to the right of the header + margin if header is present. This is consistent with the majority of published examples and guidelines available. If a start repeat is present, we should probably center over it second (thin) line of the barline but we actually centered just to the right of the dots. So we are off by about 1sp, and a single keystroke (ctrl+left) fixes it almost perfectly.

For the jazz templates, we also do something that is useful and reasonably standard although there is more variety here) in *all* cases. We could arguably move a little further left for measures with start repeats and no header, but actually the clearance between the rehearsal mark and chord symbol ends up being exactly the same, start repeat or not. So it ends up looking like we did it on purpose.

Which is to say, I can live with this for now. For 3.0, we should fix the behavior when a start repeat is present to align to the thin line.

Title Rehearsal mark are incorrectly positionned in case of repeat barline Rehearsal marks are incorrectly positioned in case of repeat barline

Fix typo in issue title.