Idea for ossia / temporary / cutaway staff support

• Jul 31, 2015 - 20:57

On a fairly regular basis we get requests for for features that basically amount to extensions to the current "Hide Empty Staves" mechanism:

Ossia - a measure that appears "floating" above another staff, such as to provide an alternate intepretation

Temporary staff - a staff that only appears when not empty even though you are not otherwise wanting to hide empty staves

Cutaway staff - like the above, but empty measures are invisible - basically, a whole bunch of ossias

It occurs to me there is a way to provide some support for these relatively simply by adding two options to Staff Properties:

- "Always hide when empty"
- "Mark empty measures invisible"

The result of setting both options would be that only measures with content would display at all. Basically, that would do an ossia or a cutaway staff. Here's an example with the staff also made small (I also modified the code to not draw system-initial initial barlines in such cases):

ossia-1.png

If you set the first option but not the second, that would give you the "temporary staff" that is occasionally requested. Basically the same as turning on Hide Empty Staves and setting all other staves to "Never hide".

Any comments?


Comments

One observation: the "Always hide when empty" option probably shouldn't go in Staff Properties, or else it won't be possible to access the staff at all if it is empty. Like the "Visible" flag, it would have to be set in Edit / Instruments list. Basically, it's just another value for that flag: "yes", "no", "only when not empty".

EDIT: I should also mention, in case it wasn't obvious: aside from the UI part, I've already done a trial implementation of this; it's less than 20 lines of code.

In reply to by Marc Sabatella

I like the fact it's 20 lines of code but

1/ The visible flag in instrument list is for an instrument (what we call Part in the code), not for a staff
2/ It doesn't support half mesure ossia.
3/ Implementing ossia this way, we will encourage the creation of more staves than necessary. Somehow, it feels hacky...
4/ It's not semantic. We don't really know if it should be played together with the existing staves or as a replacement. That could cause problem in export (MusicXML?)

In reply to by [DELETED] 5

Yes, I noticed the fact that visibility flag is for the instrument/part, not the staff. Plus, it simply sets the ordinary P_ID::VISIBLE property which is a bool. So I wouldn'y piggy-back on that after all.

And yes, I realize this wouldn't work for all possible ossias. Not just half measure, but also the desire to have different note spacing. I personally find images work well enough for those cases. I don't understand the point about more staves than necessary - it's one additional staff total per staff that might have ossias, regardless of how many ossias it needs. I guess that could add up, but I don't see an obvious way to design it to need fewer?

Anyhow, it's actually more the general idea of a temporary and potentially cutaway staff that I am most interested in, and if it provides a way of doing at least some ossias, great.

As for the semantic aspect, I actually think my proposal could simplify things. Here's how I am thinking of it:

Right now, we have a "Hide empty staves" style option that automatically hides empty staves. We also have a "Never hide" and a "Do not hide if system is empty" staff property that can prevent this hiding for specified staves. It's pretty confusing, especially that latter option, which I think I proposed (to allow a way to specify what should display in completely empty systems) but never particularly cared for. And it is still more cumbersome than people would like if you want a temporary staff without wanting to enable hide empty staves in general (need to enable it but set all other staves to "Never hide").

The way I would this working would be to keep the "Hide empty staves" style option, but get rid of the two separate "Never hide" and "Do not hide if system is empty" staff properties. Instead, we replace them with a single property "Hide when empty" (which I guess would be set from the Instruments list) that takes three possible values:

- Auto
- Always
- Never

"Auto" would be the default and means the staff is hidden when empty if the "Hide empty staves" option is turned on - eg, the normal behavior. "Always" would be the new option for providing temporary staves - the staff is hidden when empty regardless of "Hide empty staves". "Never" is the flip side of that - the staff is *not* hidden when empty regardless of "Hide empty staves".

We could add a fourth option "Auto, but keep if system is empty" analogous to the current "Do not hide if system is empty". Or keep that as a separate option in Staff Properties. I'm still pretty ambivalent about that.

"Show empty measures" - which would default to on but could be turned off to create cutaways - would be a separate staff property, along with "Show clef" etc. This could be completely separate from "Hide when empty". So you could potentially enable that option even for staves that are not being hidden otherwise.

I don't know what MusicXML supports in any of these respects, but this is getting format-specific enough that I guess it wouldn't bother me if export didn't preserve this.

I went ahead and push my branch and submitted a PR so anyone interested can try this out:

https://github.com/musescore/MuseScore/pull/2150

The PR implements a new staff property "Cutaway" and a three way switch for "Hide when empty" (values Auto, Always, and Never) that replaces the current "Never hide" (which is automatically converted to the new form on read for compatibility). I propose, but have no yet implemented, another new style option as well, "Show all staves", to force even invisible / hidden staves to display. This would be useful to allow access to empty staves that have "Hide when empty" set to Always and have therefore become totally hidden, but also to provide easier access to staves marked invisible in the Instruments dialog. I like this better than putting a new dropdown menu for each staff in the already-cluttered Instruments dialog.

In reply to by Marc Sabatella

Well I'm not desperate for this, but hacking away at arrangements for a local band with a wide range of skills, I though I might consider optional flourishes for those able to play them.

Congrats. So far so good. Working with nightly master 16 feb 2016, I managed to get a convincing ossia fairly quickly. Please do not get the idea I am complaining, but I ran into two problems when exporting a part (with ossia) from the score. The first must be described as a bit awkward, but that is the way it is. To get the stave and ossia spaced reasonably positioned you can fiddle about with the stave and system spacing. This goes awry if there is more than part, but you can sort of fix this by using negative "extra distance above stave" to bring the ossia down without tightening up the other parts by reducing the stave spacing.

The trickier aspect was that the system text was separated from the visible staff by the invisible staff. To make this workable with an ossia above the top or only part, you really need to be able to force the system text to the second staff in the system. Moving each bit of system text down individually is a bit of a hassle. Maybe I'm being stupid, but I could not find any way of moving them all down. Maybe this should be the default if the top staff is marked as "cutaway" - it would save a bit of UI.

Thanks anyway - if I need it I can live with the problems.

In reply to by TinyTrouble

The spacing is indeed not ideal, which is why I also implemented an "absolute spacer" that allows you to move two staves closer together than the default. Unfortunately, that change is not part of the nightly builds, and perhaps won't be, as some things about page layout will be changing more significantly. But it's defiitely on my list to make it possible somehow.

The system text issue is interesting. I could actually imagine either being the desired result depending on one's specific reason for using the cutaeway feature. In the ossia case, I am sure most people will feel as you do, but that's not the only use case, and I suspect in some other cases having the system text remain above the invisible staff would be the more desirable layout. I am open to being convinced otherwise though, and I don't think it would be difficult to implement the behavior that favors the ossia case.

I assume this is only an issue for the systems that actually contain ossia - systems in which the staff is completely invisible display correctly, right? So you only need to move the markings on those specific systems. You can indeed move any group of selected elements at ocne easily, just use the offset controls at the top of the Inspector window. So, for instance, right click one marking, then Select / More / Same system, then use the Inspector to move them all down together (by *increasing* the vertical offset - it is measured from the *top* of the system.

In reply to by Marc Sabatella

First thing, I was writing late in the evening (CET), very excited by this possibility and not thinking clearly, but I could not select all the system text - tempo, swing, rehearsal marks - at the same time and move them down together because the nudge disappears from the inspector with more than one type of system text selected.

However select "all similar elements" reduces the work to nudging only three groups - much more manageable.

Having put the first ossia in, I have gone a little further. On the score (with the ossia stave set visible), I can enter notes anywhere on the ossia, or copy to anywhere on the ossia, and the measures appear just by magic! I can make the ossias vanish from the score (Instruments) but I can still edit them in the parts. It is very useable.

The part attached (from work in progress) shows quite convincing and not very difficult to place system text and ossias (except they all have to be at the same height, unless you can create a stave for each different height, which would still be better than generating a stave for each ossia (name no names)).

However, there is the problem with the system start barline you mentioned (you can remove the clef but not the key signature - just make sure that the ossias do not come at the start of a line) and do not forget to check “All staves” in “Style/General/Header, Footer, Numbers” otherwise there will be no bar numbers except on an ossia at the start of a system.

BUT. Why are the accents on the first note on the second and third ossias smaller than the accent on the first ossia? They are the same size on the full score. Deleting them on either the part or the score and putting them back eliminates the problem; Ctrl Z restores the problem. (The accents came from a copy from an normal staff in the full score). Re-starting MuseScore (sorry I did not try just re-opening the file first) also makes the problem go away. Should I investigate?

Attachment Size
Magyar Sandwich8-Clarinet_2.pdf 49.47 KB

In reply to by TinyTrouble

Yes, you do indeed need to select each different group of similar elements together.

You can use system spacers to get ossias at different heights, but not on the same system.

You can suppress clefs and key signatures for any staff in its Staff Properties.

As for the accent size, it is easier to investigate a problem if you attach the actual score, not just a picture of it.

In reply to by Marc Sabatella

"You can use system spacers to get ossias at different heights, but not on the same system."

Stave spacers? You have talked about negative spacers and problems using spacers for ossias elsewhere. Ossias at different heights in the same system would be a bit ugly anyway. However, using stave spacers would affect the height of all the system text for that system (which would also move up and down as the measures moved from system to system with layout changes) because they are anchored to the wrong staff (in this context).

"You can suppress clefs and key signatures for any staff in its Staff Properties."

I cannot find a checkbox for key signatures in Staff Properties: where should I look (eyesight fading)?

"As for the accent size, it is easier to investigate a problem if you attach the actual score, not just a picture of it."

That was the point of the question “Should I investigate?”. The problem goes away when the file is reloaded, so sending the score would do no good. I have now managed to established that it has nothing to do with small staves or cutaways so I have created an issue for it - https://musescore.org/en/node/98756

In reply to by TinyTrouble

Yes, a spacer would affect the system text for those systems, so you'd have to Select / More / Same system (or use other methods such as Shift+drag to select) and move those an additional amount if you wish to use this.

Key signatures are suppressed under the "Advanced Style Properties". Not really sure why they aren't part of the main dialog, except I guess key signatures don't apply to all staff types (eg, not percussion or tablature).

Nice job tracking down the articulation size issue.

In reply to by TinyTrouble

I am pretty sure it would be easy to ignore invisible measures just as we do invisible staves, if we were convinced it was always the right thing. Otherwise, we would have to think harder about how to allow a user to specify which staves system text should appear on. Such a facility would be useful in other contexts as well, such as in an orchestra score where you want it to appear at the top of the score but also above the strings.

In reply to by Marc Sabatella

It would seem that a three way switch for each stave would be useful.
Auto: display system text if this is the top (visible) stave - as at present.
Always: always display system text (string or other section in a big score).
Never: never attach system text.

A problem with "Always" is that the offset for the system text would need to be defined independently for each stave where the text appeared in the score. This looks a bit trickier as it would probably require linking multiple sets of "system" text. Still I have sighed up for GitHub so who knows...

Bump: I definitely would like to see this.

... "It occurs to me there is a way to provide some support for these relatively simply by adding two options to Staff Properties:

  • "Always hide when empty"
  • "Mark empty measures invisible"

The result of setting both options would be that only measures with content would display at all. Basically, that would do an ossia or a cutaway staff. Here's an example with the staff also made small (I also modified the code to not draw system-initial initial barlines in such cases):" ...

Do you still have an unanswered question? Please log in first to post your question.