Two staves, one hidden—barline shown at beginning of each line

• Mar 2, 2015 - 00:13
S4 - Minor

This is an enormously esoteric issue, but screenshots will help me to describe it.

Normally, at the beginning of each line, the barline is not not shown, as in this screenshot—look closely at it and make sure you see what I'm talking about:


Naturally, though, if you're dealing with (say) a piano part, where there are two staves which are connected, the beginning of the line looks like this:


Then comes the bug. If one of those staves is empty, and you have "Hide empty staves" selected in the Style pane, then you should have a normal-looking single staff. But you don't. It looks like this:


Do you see it? Look back at the first screenshot and see the difference. The worst thing about this is that there seems to be no workaround.

I really, really hope this is considered significant enough to be fixed.


Actually, you can mark the initial barline invisible - just click it and press "V". As workarounds go, though, it wouldn't be very fun to have to do that for the initial barline of every system of a long piece, esepcially given the layout might change.

I'm curious if you have a specific reference to say this *should* be hidden, though. I could easily imagine that "mixed" systems like this could easily be a case where the standard says the barline should be shown. Of course, even if so, you could get that behavior by setting the option in Style / General / Barlines for "Barline at start of single staff". So it does *seem* lie a bug to me that it doesn't work as you suggest. I'd just like more information to be sure.

I'm not sure even where to look for a source that says one way or another. But when I'm creating a number of parts, and they're all mostly all one staff, then I don't want the fact that one of the parts briefly splits into two staves to make the different parts' style not match.

But I'm glad the "toggle visibility" shortcut works on the barline. I thought because nothing showed in the Inspector that it couldn't be changed, so thank you.

So you are talking about "parts", as in, individual instruments parts generated from a full score? I guess piano parts in particular? That's not the case I was thinking of - I was thinking more of the score itself, where it might happen that some system ended up with a single staff.

Anyhow, I just tried it out, and it's a trivial change to make it happen. Just a matter of trying to find evidence one way or another in the published literature to see if there is a standard or not. As I said, since you can *force* the barlines to appear using the style setting, it's probably not vital we find an example, but still, I'd prefer the default output adhere to standards / established convention where possible.

Actually, I just named the piano because it's easiest to picture it that way. In the specific case I'm talking about, I want a piccolo part to briefly separate from a flute part… but that's neither here nor there.

I at least confirmed that the two published pieces I first thought of that do this kind of thing do it the way my instinct says. They're under copyright, so I'm not sure about scanning them and showing you, but if you can find them yourself: Howard Hanson's "Rhythmic Variations on Two Ancient Hymns," and Carrie Lane Gruselle's arrangement of "Nobody Knows the Trouble I've Seen." The first violin part, at least, of the Hanson, and all the parts of "Nobody Knows" do the thing where the staff separates into two staves for a short time. In both cases, the two-staff sections are joined by a barline at the beginning of the line, while when there's only one staff there's no barline. I would assume that they're following standard practice with this.

OK, thanks. I could actually imagine piano being an exception because it is normally two staves, and perhaps should remain so even if it goes down to one staff, but in any event, again, if we make the change you suggest, you could get that effect by setting the style option.

I'll put this on my list and hoepfully submit a change soon.

The context of a full score is an entirely different matter, as is that bracket appearing to the left of the staves. I'm talking about a one-instrument part for a one-staff instrument—except where there are two staves. Beyond question, where there is more than one staff, they should be connected at the beginning of the line.

I think the point is, what if it is a full score, but is using Hide Empty Staves, and one particular system has only one staff. In this case, there does seem to be a logical reaosn to want it to still show the initial barline, although once again, if you want it, you can set the option to have it, so I'm still inclined to make the change.

Status (old) active patch (code needs review)

Here's a PR that partially solves this:

Unfortunately, Hide Empty Staves is a little glitchy in that some times things are done before we know for sure which staves will be empty and which won't, so we sometimes see cases where something looks wrong right after changing this option (or loading a file that uses the option), and then it fixes itself as soon as you do anything. This is one of those cases.

What's the current status of this bug? I'm using version 3.6.2, and I've got a piano part where one staff is hidden for most of the piece; I'm trying to get the initial barlines to disappear on the single-staff systems and am having no luck. Toggling "Barline at start of single staff" has no effect. I'm trying select-all but I can't figure out precisely how to "force a relayout" (as suggested in a different thread)... does that still work in verlion 3 or is there a different workaround?

Please see the attached score to observe this behaviour.

OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit):, revision: 3224f34

Attachment Size
initial barline bug.mscz 11.86 KB
Status closed active
Regression No
Workaround No

The original bug was fixed several years ago, but it does appear to have come back, so I'm reopening this.

Workaround No Yes

Workaround is to hide the initial barlines individually (eg, select and press "V"). I can't think of a way to select all initial barlines in one operation, so it's something you probably want to wait until the end for, after the final layout is fixed.