Tenor Clef does not appear after repeat
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.
Fix version
3.1.0
Comments
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
A workaround would be to add the clef to the note immediately following the repeat.
I've had time to test this, and now see it's only when you have an end repeat barline, not a start repeat, which is what I had handy at first. It also affects all clefs I tested, so it's not a tenor clef only problem.
I'm curious if this is related to #284307: Clef doesn't change when adding clef to first measure of score . I'm going to cross link them so maybe someone will look into it.
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.
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
In reply to end repeat barlines only… by Jojo-Schmitz
If they only playback when added to the measure then that prevents a fix where another end repeat would be added before the clef. The road now would be to insert an empty measure after the one with the end repeat (and on the same system) and add the clef there.
https://github.com/musescore/MuseScore/pull/4922
Fixed in branch master, commit 691b83c03e
fix #285605, fix #228531, fix #77396: repeat barline, then clef
Fixed in branch master, commit 13b568c6d7
_Merge pull request #4922 from MarcSabatella/repeat-clef
fix #285605, fix #228531, fix #77396: repeat barline, then clef_
Automatically closed -- issue fixed for 2 weeks with no activity.