Thoughts on the "Direction" property for text elements
One of features I am most looking forward to having available in MuseScore 3 is the new "Direction" property for text elements. This allows them to easily be flipped above or below the staff, just like we do for articulations, slurs, ties, etc (hmm, what else?)
However, it seems that right now the feature is a bit more limited than I would prefer. My concerns are:
1) the effect of flipping seems to assume a five-line staff with default spacing
2) no way to specify different default vertical alignments & offset for above versus below
3) no way to specify a default direction for a given text style
By 1), I mean, if you flip a text from above to below the staff, it's too far below for 1-line or 3-line percussion staves, not far enough below for 6-line tab staves:
By 2), I mean, you might want things set up to that when text is above, the bottom/baseline of the text is 2sp above the staff, but when below, chances are good we really want the *top* of the text to be 2sp below the staff, so either way there is 2sp clearance. If so, you'd probably want to be able to say, use bottom/baseline alignment when above, use top alignment when below. But maybe you care more about making sure the text aligns well when placed below the staff, so you want to use baseline alignment in either case, but you want to set it so that baseline is 2sp above the staff but maybe 3sp below, so the clearance is approximately 2sp either way but aligns well. Or, maybe you actually want it so that when above the staff, you want *more* clearance (or less) than when below. For example, maybe you want dynamics for vocal staves to be slightly above the staff by default, but when flipped below, have them *way* below so they clear the lyrics.
We could solve this with additional fields in the text style, but maybe MuseScore should just do the calculation itself to provide a more reasonable default. Currently, it seems that MuseScore basically just adds 5sp to the offset when flipping text from above to below, and also silently converts to bottom alignment:
I think it should convert top alignment to bottom and bottom to top, but keep baseline or middle alignment as is (so in the above example, the text would sit directly on the bottom staff line). But it should *also* account for the nominal text height so the effect is more balanced:
Of course, you wouldn't normally normally use 0sp offset for text, but the idea is, the offset then becomes "distance from staff". If you specify a default of -2sp offset with bottom alignment, you get literally 2sp clearance between the bottom of the text and the top of the staff, or when flipped below, you get literally 2sp clearance between the top of the text and the bottom of the staff:
This doesn't directly address the possible desire to have *different* clearance above/below, but maybe that's not so important right now (particularly if collision avoidance reduces the need for this).
There is also some weirdness going on where if you change the alignment in text properties nothing appears to happen - the alignment is changed but the offset is "corrected" to keep the same position, more or less. Maybe that's design, not sure, but it seems glitchy at best. I won't worry about that for now, but I guess it is possible this behavior is confusing me regarding the direction as well and things asre somehow more logical than they appear.
By 3), I mean, if you have a text style you want to default to being below the staff, you shouldn't have to specify a large position offset from the top of the staff. Besides being awkward, it makes the position depend on the staff height, which leads to the complaints we currently get about the default position of dynamics relative to percussion or tab staves:
Instead, we should allow the text style itself to specify whether the default direction is above or below. That way we can have the default for dynamics be 3sp below instead of 8sp "above". 8sp below is only reaosnable for 5-line staves with standard spacing; 3sp below would always be 3sp below.
Comments
Just thinking big-picture with this feature, would it have applicability for elements that are normally above the staff for vocal lines (like dynamics and hairpins) but below for instruments?
In reply to Just thinking big-picture by marty strasinger
Yes, it works already for hairpins and dynamics.
In reply to Just thinking big-picture by marty strasinger
It works, but someday, I would also like to see staff properties to control the defaults, or some similar means of control, to make it even easier / more automatic. That seems like a separate discussion though.
In reply to It works, but someday, I by Marc Sabatella
I definitely agree with having the feature be staff-specific. It would finally give the ability to have human voice vice instrument specific staves. When I do an opera selection with over a dozen instruments and 8 to 10 vocal lines, with the existing system there is no way to avoid lots of manual adjustment of dynamics, hairpins, etc. Search musescore.com under my name for La boheme or Lucia di Lammermoor for a couple of examples.
In reply to I definitely agree with by marty strasinger
While I agree it would be nice to have this staff-specific, given how things are currently looking, it really wouldn't make that much difference. As it is, it seems it would be extremely simply to right click one dynamic, Select / All Similar Elements on Same Staff, then flip the placement to "up". No "manual" adjustments required at all. And in fact, it's already perfectly possible to do this with no manual adjustments, just define a custom text style and apply it the same way. Another possibility - and apparently the one being recommended here - is to create a second copy of each dynamic in a custom palette with the placement set appropriately.
So while having defaults be staff specific would be nice, it's still only a handful of clicks to fix an entire score, no manual adjustments required.
@Marc: what you describe and propose here seems extremely logical to me.
Implementing above/below for more elements is on my (virtual) todo list. A more complete implementation for this is already done for dynamics. I believe that placement, offsets, default values etc. should be associated with specific elements instead of text styles. Most of these properties should be initialized by style values for enhanced flexibility.
This does not necessarily mean that text offsets will go away.
In reply to Implementing above/below for by [DELETED] 3
Are you saying dynamics are handled differently than other text elements in this respect? Could you explain the intended use model? I see references to placeAbove() and placeBelow() in the code, but I don't understand how it is supposed to be used. And I'm still not understanding how the direction property is supposed to work for other text elements, where it seems it has some effect but not an especially good one.
In reply to Are you saying dynamics are by Marc Sabatella
mmh, you probably mixed up the "Direction" property with the "Placement" property. Direction can be "up" or "down" and is used for slurs, stems etc. It determines how an element is drawn, not necessarily where. Placement can be "above" or "below" and tells mscore where to position an element (above or below a staff). Both properties are associated with specific element types and not with text styles.
Every element with a Placement property will get three style values:
- default value for Placement
- default "above" position
- default "below" position
All this is work in progress and only implemented partially. Currently only Lyrics and TextLines have complete implementations.
In reply to mmh, you probably mixed up by [DELETED] 3
OK, that sounds promising. Looking forward to seeing this when complete!
In reply to OK, that sounds promising. by Marc Sabatella
Some more have just been implemented
In reply to Some more have just been by Jojo-Schmitz
It's an interesting work in progress :-) Flipping the placement of a staff text now works more the way I expect, where if the style has the default position high above the staff, the flipped position is correspondingly low below, at least if the text style is set to "top" vertical alignment. Other alignment styles don't work as I'd expect though. But the new style properties for placement of dynamics and lyrics are nice.