-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to code a system's left-margin labels #277
Comments
I've now edited the above proposal, adding optional |
I have to say I dislike this proposal, with the notable exception of the |
I don't think that can work. The same part may have to be labelled differently in different system layouts. The left-margin labels actually apply to staves, not parts. |
@notator Yes, we have to apply labels to staff-layouts & group-layouts, not to part-layouts. That doesn't mean it can't happen in the layout-hierarchy. Okay, so let's say that default positioning of brackets have them going from children on the right to parents on the left. And default positioning of labels has them to the left of all brackets, once again where children-to-parents = right-to-left. Labels are vertically centered on their staff or on their group symbol. Surveying a random sampling of real chamber music and orchestral scores on imslp.org showed this being by far the most common configuration. Please note that while I have tried to come up with good names, I am not tied to them. For instance ProposalFor this purpose, then, I'd like to propose a child to both group-layout and staff-layout: I would like to add the new attribute
I would like to add the new attribute
Note: In the examples below, I have removed the idea of reusable -layout elements (except system-layout), which are not part of the current spec, partially because most people did not want to try track that. It makes for longer files, but actually removes quite a bit of complexity, since you don't have to worry about how the individual elements might be reused in different system-layouts. Example 1&2Code
Example 3This actually becomes dead simple. The first one is the default positioning, and the second requires only one additional symbol-placement tag. Code
Example 4The one problem I have with my proposal is that there is more than one way to do things. Both of the following work for this example. Code 1 (Inside/Outside)
Code 2 (Rightmost)
Alternate Proposal:It might be that the placement enums are too complicated (or cumbersome) for programs (rather than humans) to properly assign in a way that conforms to "one way to do things". In that case, we would instead define "columns". These columns are referenced right-to-left across vertical placements for both symbols and labels. Anything that lines up vertically is given the same column number, and the |
This proposal
Note that the
<group-layout>
element is no longer recursive here, but the<group-label>
element is. See the Thoughts about Recursion below.<part>
-related content of the system's staves. The<part>
element can't know how it is going to be combined on a staff with other<part>
s, so can't know exactly how it is going to be labelled.<labels>
element, inside<system-layout>
, following the<staff-layout>
and<group-layout>
definitions.<part>
s local use of staff index.<part>
'sname
andshort-name
attributes redundant. They should be deleted.label
,labelref
andsymbol
attributes on<group-layout>
and<staff-layout>
redundant. These attributes should be deleted.<group-layout>
no longer needs to be recursive.<group-layout>
's<group-layout>
content should therefore be deleted.As a reminder of how to code a grand staff, see @clnoel's #185 (comment) (point 5).
Thoughts about Recursion
Simple recursion is possible in XML schemas (See
https://stackoverflow.com/questions/148988/recursion-in-an-xml-schema).
Edit: Forward declarations are allowed in XML schema, so the workaround below is probably not necessary:
If the following two-level recursion is a problem
we could simply create two new elements (
<group-label2>
and<group-symbol2>
), and limit the nesting to two levels:This would only affect Example 4 below.
If thought necessary, three levels could also be implemented in this way.
Definitions of Proposed New Elements
The code in the rest of this proposal assumes the following new elements:
two low-level helper elements for creating multi-line text blocks.
(We've discussed this before, but don't seem to have come to any conclusion. I've adopted this solution here as a temporary measure. These details could be changed later.):
<string>
:text
(a String): defines a string of text that will be rendered in a single line.<text-block>
:<string>
elements that define the lines of a multi-line text block.three new grouping symbol elements (bracket types):
The use of "symbol" in these names is consistent with current usage in the docs (and MusicXML), but I think its confusing. I'd rather call these
<group-bracket>
,<staff-bracket>
and<staff-bracket2>
.<group-symbol>
:type
,top-staff
andbottom-staff
.<staff-label>
and/or<group-label>
elementsN.B. two-level recursion:
<group-label>
contains<group-symbol>
.<staff-symbol>
:type
,top-staff
andbottom-staff
.<staff-symbol2>
element that will be rendered to its immediate left.<staff-symbol2>
:type
,top-staff
andbottom-staff
.The
type
attributes take grouping symbol values.The
top-staff
andbottom-staff
attributes are staff indices in the<system-layout>
. The top staff has index 1 and the index increments downwards. Staves inside<group-layout>
elements count individually.two new label elements
<group-label>
column-align
-- optional attribute having possible valuesleft|center|right
. Default:center
Aligns this
<text-block>
with respect to the widest<group-label>
in the same column in the system label. The right edges of<group-symbol>
and<staff-symbol>
elements in the same column are always aligned.<text-block>
element<group-symbol>
or<staff-symbol>
element.The
<text-block>
is positioned to the left of, and is vertically aligned with the vertical centre of, the contained<group-symbol>
.<staff-label>
staff
-- the staff index in the system.column-align
-- optional attribute having possible valuesleft|center|right
. Default:center
Aligns this
<text-block>
with respect to the widest<staff-label>
in the same column in the system label. The right edges of<staff-symbol>
elements in the same column are always aligned.<text-block>
element.<staff-symbol>
element.The
<text-block>
is aligned horizontally with the staff, and immediately to the left of it, separated from the staff only by any<staff-symbol>
or<staff-symbol2>
element that includes the staff.Coded example diagrams
Example 1:
These are coded in two separate
<system-layout>
s:"page1SystemLayout"
and"defaultSystemLayout"
.(In this case, the only difference between the two
<system-layout>
s is in the outer<string>
associated with the upper<group-label>
. I think its better to assume that the two layouts might be very different, and not to attempt any optimisation at this point.)Code
Example 2:
Two Voices on a staff: The
<staff-label>
on staff 1 uses a multi-line<text-block>
. Multi-line<text-block>
s can also be used in<group-label>
s.Code
Example 3:
This is the brackets ordering issue posed in #276. I've put the answer here because it needs to be part of the general solution.
Code
Example 4:
A score for two groups of players, one on the left of the stage, one on the right.
Demonstrates
<group-label>
nesting.Code
The text was updated successfully, but these errors were encountered: