Tenor Clef does not appear after repeat

• Mar 8, 2019 - 22:22
Reported version
3.0
Priority
P1 - High
Type
Graphical (UI)
Frequency
Many
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
Yes
Project

If you place a tenor clef in a measure after a repeat barline, the clef doesn't show in the new measure; only in the next system.


Comments

Status active needs info

I haven't seen this problem. Can you post a sample and explain how to recreate the issue.

Step 1: Add a end repeat to a measure.
Step 2: Change the clef in the next measure.
The clef won't appear as it should. (Try it without the repeat). It appears directly on the next line.

My guess is when the that the end repeat renders over the cleff. The fact that the notes change to match the new clef confirms this.
I'll look into it. Good way to get started with GSoC

Some additional info based on discussions on Telegram - the clef actually is being added, in the place clefs are normally added - before the barline. The code is smart enough to do a check before displaying the clef and knows not to display clefs right before an end repeat barline. it just isn't smart enough to then force one to be generated in the next measure.

BTW, good guess about it being related to #284307: Clef doesn't change when adding clef to first measure of score , but I think it's not. But see #228531: Courtesy clefs don't appear on lines ending in repeat barlines. We might want to consider showing a courtesy clef after the end repeat if it's at the end of the system.

Hmm, maybe that's even a solution to this problem - not force the clef to appear in the header of the next measure, but simply generate it after the end repeat in the trailer of this one. Not really sure about that, but worth considering.

I'm not even sure what the problem is supposed to be. The suggested "workaround" (i.e. adding the clef to the chord/rest after the end repeat) is actually what you are supposed to do to get the clef to appear after the bar line.

Since it's possible to add the clef to the measure, MuseScore should handle both situations the same, but keep track of how the user added the clef in case they delete the barline. It seems from telegram discussions this is the plan.

Right now there is a clear bug - if you add to the measure, notes are appearing as if the clef has changed but there is no visual indication of the clef change whatsoever - not until the next system anyhow. The clef is actually present before the barline but it's deliberately hidden during layout, and that's a good thing, because it shouldn't appear before an end repeat barline. This happens in addSystemTrailer(). What needs to happen is either equivalent code to generate one in addSystemHeader(), or what I suggested above - simply displaying the clef after the barline but still in the previous measure, in cases where there is an end repeat. This could be better in that it also solves the courtesy clef problem I linked to.

As a user, sure, you can workaround the problem by adding the clef to the first note of the measure rather than o the measure itself, but doing the latter shouldn't produce the clearly buggy results it does now. And really, adding to the first note of the measure isn't ideal either, it looks OK if the two measures are on the same system but doesn't do what one would want if there is a break between them - no courtesy clef at the end of the previous system, plus you see the original clef again at the start of the next system before the mid-measure clef change. It's not "wrong" per se, but it's not what I'd want to see. I want the clef change after the end repeat barline whether there is a break there or not, and no repetition of the original clef at the start of the next system if there is a break.

Workaround Yes No

It seems like MuseScore ignores end repeat barlines add to a note (only acknowledges those added to the measure itself). Is this by design, or is it a feature yet to be implemented? Should I make an issue for it?
Nonetheless, add the clef after the bar line doesn't seem like a fix, at least the way I'm doing it: Add another (end repeat) barline before the clef, and make the one after the clef a normal barline. Though, I can't figure out how to add a barline segment immediately before the clef. So far, I've managed to add the and repeat to the begining of the measure.

https://github.com/musescore/MuseScore/compare/master...JadeMaveric:285… (check measure.cpp)

end repeat barlines only play back when added to a measure, nit when added to a note, this is by design and (IMHO) totally unrelated to the issue at hand here

Fix version
3.1.0