Skip to content
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

More sophisticated layouts (from issue #185) #281

Merged
merged 4 commits into from Feb 16, 2022
Merged

Conversation

adrianholovaty
Copy link
Contributor

This pull request brings the agreed-upon changes from #185 (specifically, from this summary comment) into the MNX spec. This introduces more sophisticated methods of mixing and matching notation data within layouts.

The updated docs (as of this pull request) are visible here: https://cdn.githubraw.com/w3c/mnx/issue-185/docs/

The specific changes are:

  • Added <voice-layout>, which lives within <staff-layout>. This is a way to say "In this staff, use the notation data from parts X and Y; use upstems for all of part X's notes and use downstems for all of part Y's notes."
  • Added <system-layout-change>. This is a way for a system layout to change mid-measure.
  • Gave <part-layout> two new attributes, stem and voice. Note that I opted for voice instead of part-voice, to be consistent with the existing staff.
  • Added the example document Multiple layouts.
  • Added the example document Orchestral layout.
  • Added the example document Organ layout.
  • Updated the existing example document System layouts to use <voice-layout>.

Special thanks to @clnoel for putting together the example images and markup! Any mistakes are my fault.

For everybody reviewing this, I highly recommend looking at those four example documents to gain some intuition on how this stuff all works and what the benefit is. Speaking personally, I found it hard to understand the new elements/attributes in the long-winded discussion of #185, and seeing specific images made it much clearer.

One final note. The original summary suggested <staff-layout> needs a part-staff attribute, but I didn't see the need to add that in this pull request. Wouldn't this already be handled by the child <part-layout>'s staff attribute? Let me know if I'm missing something.

@ahankinson
Copy link

You might consider changing the examples to read "Upper voices" and "Lower voices" instead of "Women" and "Men" since the voice parts are not exclusive to a given gender.

Copy link

@bhamblok bhamblok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The HTML-element <nobr> is a non-standard and deprecated element. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nobr
We could use <span style="white-space: nowrap;"> instead.

@clnoel
Copy link

clnoel commented Jan 31, 2022

  1. Hmm.. the pre-existing staff attribute on <part-layout> was supposed to be removed as a part of this, in favor of moving it to the <staff-layout> (I forgot to list that in my summary post). In retrospect, however, I prefer having it on the <part-layout>. I think it makes more sense. I'd appreciate other's viewpoints on that, though.
  2. I dislike the change from part-voice to voice. I prefer to change staff to part-staff instead. This is a very clear indicator, to me, that we are filtering the part itself, instead of saying, for example, that the <part-layout> is defining a voice id, or is on the second staff down.

Suggested changes:

  • Regardless of the decisions for the two points above, the examples should match the definitions and right now they do not. part-voice is used, even though voice is defined in the definitions, and part-staff is used on <staff-layout> even though it is not defined on that element.
  • I'm not sure if it was you or me, @adrianholovaty , but I think that in the "Organ Layout" the "organ3StaveSplitOber" layout should use part-staff=2 instead of part-voice="Hauptwerk" and part-staff=3 instead of part-voice="Pedal", since that example was supposed to demonstrate the use of part-staff.

@notator
Copy link
Contributor

notator commented Feb 1, 2022

I agree with @clnoel on all points.

Also, I think we need to resolve #278 before committing this PR.
How should the label for a staff containing two parts be encoded?
twoPartsOneStaff

@clnoel
Copy link

clnoel commented Feb 4, 2022

@notator, while the labels are included in the examples, how we do the labels is not a focus, which is why I did not attempt to recognize the line breaks in the labels of the Orchestral Layout example at all. We can come back later and alter that example once we've hashed it out. I've finally responded to #277, which actually has a potential for greater impact on the new examples, if you want to go examine that. But I don't think that we need to hold up this PR for either unresolved issue. We'll just make a new PR with the changes in it.

@adrianholovaty
Copy link
Contributor Author

@ahankinson Thanks — that's now fixed in the example ("SA" and "TB").

@clnoel Thanks — I agree part-voice and part-staff are clearer. I've just updated the pull request accordingly, and I've fixed the incorrect bits in the example docs. Could you give it a final readthrough and make sure everything looks good? I believe this is ready to merge but will wait for your OK.

@clnoel
Copy link

clnoel commented Feb 15, 2022

@adrianholovaty I think you either misunderstood my suggestion for the Organ example, or made a typo.

In the "organ3StaveSplitOber" layout, the following line:
<part-layout part="organ" part-staff="2" stem="down"/>
should instead be
<part-layout part="organ" part-voice="Oberwerk" stem="down"/>

and

<part-layout part="organ" part-voice="Hauptwerk"/>
should instead be:
<part-layout part="organ" part-staff="2"/>

Other than that, I think it looks really good!

--Christina

@adrianholovaty
Copy link
Contributor Author

@clnoel Thanks for the catch! That's now fixed. I'll go ahead and merge this now.

@adrianholovaty adrianholovaty merged commit 9d19e1b into main Feb 16, 2022
@adrianholovaty adrianholovaty deleted the issue-185 branch February 16, 2022 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants