Clef changes at repeats

• Jun 5, 2019 - 21:51
Reported version
3.1
Type
Functional
Frequency
Once
Severity
S5 - Suggestion
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

This seems to be a new feature, but I find it troublesome. I publish music for a instrument with a large range, and there are frequent clef changes. At a start repeat barline, the program now forces the clef change to appear in limbo, between the bars. I should be able to place the clef change after the start repeat by dragging it over the first note. I've been told this is non-standard, but with repeats every 8 bars and lots of clef changes, the result is quite distracting and unattractive. There is no workaround, and I think this new feature should be an option (maybe even a default, but I should be able to turn it off). I've attached a screen shot.

Attachment Size
Screen Shot 2019-06-05 at 1.40.24 PM.png 96.24 KB

Comments

Status active PR created

This is a bug, not an annoying new feature. Technically speaking, there is a very simple explanation for why this happens, and the fix is equally simple. When there are multiple Segments in the same measure at the same tick, they are ordered according to their SegmentType. SegmentType::Clef comes before SegmentType::StartRepeatBarLine, so that is the order in which they appear in the score. While this sort of makes sense in terms of standard notation, there is no reason for it to be this way, and as it turns out this is most likely incorrect. In the usual case, the clef would be applied to the measure, and thus would be added at the end of the previous measure. Even though the clef would be at the same tick as the start repeat barline, it would belong to the previous measure, and therefore it would appear before the start repeat barline anyway. If the clef is applied to the first chord in the measure, it would be expected that the clef should appear right before the chord, and not before the start repeat barline. The way it is now, it looks like the clef has been moved to the end of the previous measure, but that is only because the end barline of the previous measure is hidden due to the presence of the start repeat barline.

https://github.com/musescore/MuseScore/pull/5108 fixes this issue by reversing the order of SegmentType::Clef and SegmentType::StartRepeatBarLine.

One thing I'd like to clarify, based on my understanding: it's not quite so simple as to say the current behavior was just a bug. When the ordering of clef followed by start repeat was introduced, this was necessary in order to make the default layout correct in these cases, where the previous measure ends in an end repeat or this is the first measure of a system. Indeed, without that ordering, it would have been just as hard to get the current clef-then-repeat result as it is now to get the repeat-then-clef result you desire here.

However, a change made just before 3.1 - to force the clef to display after the end repeat even when actually present in that previous measure - does indeed make it possible to revisit the ordering of the clef and start repeat when the clef is in the next measure. The only thing that will now become hard is having a clef change after the header but before a start repeat at the start of a system. In other words, this:

clef-repeat.png

It's unfortunate, but it is mainly an issue at the start of a piece - otherwise I'd be happy to place the clef change in the previous bar so it appears as a courtesy at the end of the previous system and in the header of this one. And since it's the start of the piece, the repeat barline isn't needed anyhow. And if you really wanted, you could still get this with leading space and offset adjustments.

So I can live with this, and thus I support this change and am happy the simple/obvious solution will actually work!

Marc, I tried fixing it with the offset/leading space adjustment. It works ok with a treble clef, but leave a gap between the end/start repeats with a change to alto clef. For the kind of work I do, it just works much better to have the option to put the clef change to the right of the start repeat.

You should still be able to do that with enough fiddling - you may need to adjust leading space of both the repeat and the first note, and apply an offset to the clef, etc. But to be clear - with the change Matt has submitted, putting the clef to the right will be as simple as adding to the first note of the measure, exactly as if there were no start repeat there. The workaround will only be needed to create the type of notation shown above.

Fix version
3.2.0