Skip to content

Commit

Permalink
Added ways to encode more sophisticated layouts (#281)
Browse files Browse the repository at this point in the history
* 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 part-voice. Renamed the existing staff attribute to part-staff, for consistency and clarity.

* Added new example documents "Multiple layouts", "Orchestral layout" and "Organ layout". Also updated the existing "System layouts" example to use <voice-layout>.
  • Loading branch information
adrianholovaty authored Feb 16, 2022
1 parent a10119e commit 9d19e1b
Show file tree
Hide file tree
Showing 52 changed files with 2,183 additions and 58 deletions.
850 changes: 845 additions & 5 deletions docgenerator/data.json

Large diffs are not rendered by default.

Binary file added docgenerator/media/examples/multiple-layouts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docgenerator/media/examples/organ-layout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/mnx-reference/data-types/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ <h1>Data types used in MNX</h1>

<li><a href="part-id/">Part ID</a></li>

<li><a href="part-stem-direction/">Part stem direction</a></li>

<li><a href="perform-option/">Perform option</a></li>

<li><a href="repeat-times/">Repeat times</a></li>
Expand Down Expand Up @@ -141,6 +143,8 @@ <h1>Data types used in MNX</h1>

<li><a href="voice-id/">Voice ID</a></li>

<li><a href="voice-stem-direction/">Voice stem direction</a></li>

<li><a href="wedge-type/">Wedge type</a></li>

<li><a href="yes-or-no/">Yes or no</a></li>
Expand Down
2 changes: 2 additions & 0 deletions docs/mnx-reference/data-types/measure-location/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ <h2 id="where">Where is this type used?</h2>

<p><a href="../../elements/segno/">&lt;segno&gt;</a> — "location" attribute</p>

<p><a href="../../elements/system-layout-change/">&lt;system-layout-change&gt;</a> — "location" attribute</p>

<p><a href="../../elements/tempo/">&lt;tempo&gt;</a> — "location" attribute</p>

<p><a href="../../elements/wedge/">&lt;wedge&gt;</a> — "end" attribute</p>
Expand Down
106 changes: 106 additions & 0 deletions docs/mnx-reference/data-types/part-stem-direction/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@

<!DOCTYPE html>
<html lang="en">
<head>
<title>Part stem direction data type | MNX specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="../../../static/styles.css">

</head>

<body class="has-sidenav">
<div class="topnav">
<button id="toggle" class="toggle">
<svg viewBox="0 0 100 80" width="16" height="16" fill="currentColor">
<rect width="100" height="20" rx="8"></rect>
<rect y="30" width="100" height="20" rx="8"></rect>
<rect y="60" width="100" height="20" rx="8"></rect>
</svg>
</button>
<a class="logo" href="../../../">
<span class="logo-text">MNX specification</span>
</a>
</div>


<div class="content">
<nav class="sidenav">
<ul>
<li><a href="../../../">Home</a></li>
<li><a href="../../">Reference</a>
<ul>
<li><a href="../../element-tree/">Elements</a></li>
<li><a href="../">Data types</a></li>
<li><a href="../../examples/">Example documents</a></li>
</ul>
</li>
<li><a href="../../../concepts/">Concepts in MNX</a></li>
<li><a href="../../../comparisons/musicxml/">MNX and MusicXML</a></li>
</ul>
</nav>
<main>

<p class="breadcrumb">
<a href="../../../">MNX specification</a> &gt;
<a href="../../">MNX reference</a> &gt;
<a href="../">Data types</a> &gt;
Part stem direction
</p>

<h1>Part stem direction data type</h1>














<h2 id="allowed">Allowed values</h2>

<table>

<tr>
<th class="nobr">up</th>
<td>Set all stem directions to up.</td>
</tr>

<tr>
<th class="nobr">down</th>
<td>Set all stem directions to down.</td>
</tr>

<tr>
<th class="nobr">float</th>
<td>Determine stem directions algorithmically according to notehead staff position.</td>
</tr>

</table>



<h2 id="where">Where is this type used?</h2>




<p><a href="../../elements/part-layout/">&lt;part-layout&gt;</a> — "stem" attribute</p>




</main>
</div>


<script type="text/javascript" src="../../../static/global.js"></script>

</body>
</html>
2 changes: 1 addition & 1 deletion docs/mnx-reference/data-types/staff-index/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ <h2 id="where">Where is this type used?</h2>

<p><a href="../../elements/octave-shift/">&lt;octave-shift&gt;</a> — "staff" attribute</p>

<p><a href="../../elements/part-layout/">&lt;part-layout&gt;</a> — "staff" attribute</p>
<p><a href="../../elements/part-layout/">&lt;part-layout&gt;</a> — "part-staff" attribute</p>

<p><a href="../../elements/sequence/">&lt;sequence&gt;</a> — "staff" attribute</p>

Expand Down
2 changes: 2 additions & 0 deletions docs/mnx-reference/data-types/staff-label-type/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ <h2 id="where">Where is this type used?</h2>

<p><a href="../../elements/staff-layout/">&lt;staff-layout&gt;</a> — "labelref" attribute</p>

<p><a href="../../elements/voice-layout/">&lt;voice-layout&gt;</a> — "labelref" attribute</p>




Expand Down
2 changes: 2 additions & 0 deletions docs/mnx-reference/data-types/string/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ <h2 id="where">Where is this type used?</h2>

<p><a href="../../elements/staff-layout/">&lt;staff-layout&gt;</a> — "label" attribute</p>

<p><a href="../../elements/voice-layout/">&lt;voice-layout&gt;</a> — "label" attribute</p>




Expand Down
2 changes: 2 additions & 0 deletions docs/mnx-reference/data-types/system-layout-id/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ <h2 id="where">Where is this type used?</h2>

<p><a href="../../elements/system-layout/">&lt;system-layout&gt;</a> — "id" attribute</p>

<p><a href="../../elements/system-layout-change/">&lt;system-layout-change&gt;</a> — "layout" attribute</p>




Expand Down
2 changes: 2 additions & 0 deletions docs/mnx-reference/data-types/voice-id/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ <h2 id="where">Where is this type used?</h2>



<p><a href="../../elements/part-layout/">&lt;part-layout&gt;</a> — "part-voice" attribute</p>

<p><a href="../../elements/sequence/">&lt;sequence&gt;</a> — "voice" attribute</p>


Expand Down
111 changes: 111 additions & 0 deletions docs/mnx-reference/data-types/voice-stem-direction/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@

<!DOCTYPE html>
<html lang="en">
<head>
<title>Voice stem direction data type | MNX specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="../../../static/styles.css">

</head>

<body class="has-sidenav">
<div class="topnav">
<button id="toggle" class="toggle">
<svg viewBox="0 0 100 80" width="16" height="16" fill="currentColor">
<rect width="100" height="20" rx="8"></rect>
<rect y="30" width="100" height="20" rx="8"></rect>
<rect y="60" width="100" height="20" rx="8"></rect>
</svg>
</button>
<a class="logo" href="../../../">
<span class="logo-text">MNX specification</span>
</a>
</div>


<div class="content">
<nav class="sidenav">
<ul>
<li><a href="../../../">Home</a></li>
<li><a href="../../">Reference</a>
<ul>
<li><a href="../../element-tree/">Elements</a></li>
<li><a href="../">Data types</a></li>
<li><a href="../../examples/">Example documents</a></li>
</ul>
</li>
<li><a href="../../../concepts/">Concepts in MNX</a></li>
<li><a href="../../../comparisons/musicxml/">MNX and MusicXML</a></li>
</ul>
</nav>
<main>

<p class="breadcrumb">
<a href="../../../">MNX specification</a> &gt;
<a href="../../">MNX reference</a> &gt;
<a href="../">Data types</a> &gt;
Voice stem direction
</p>

<h1>Voice stem direction data type</h1>














<h2 id="allowed">Allowed values</h2>

<table>

<tr>
<th class="nobr">part</th>
<td>Use stem directions as defined by the first &lt;part-layout&gt; within this &lt;voice-layout&gt;.</td>
</tr>

<tr>
<th class="nobr">up</th>
<td>Set all stem directions to up.</td>
</tr>

<tr>
<th class="nobr">down</th>
<td>Set all stem directions to down.</td>
</tr>

<tr>
<th class="nobr">float</th>
<td>Determine stem directions algorithmically according to notehead staff position.</td>
</tr>

</table>



<h2 id="where">Where is this type used?</h2>




<p><a href="../../elements/voice-layout/">&lt;voice-layout&gt;</a> — "stem" attribute</p>




</main>
</div>


<script type="text/javascript" src="../../../static/global.js"></script>

</body>
</html>
21 changes: 21 additions & 0 deletions docs/mnx-reference/element-tree/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ <h1>Elements used in MNX</h1>
<li>
<a href="../elements/part-layout/">&lt;part-layout&gt;</a>
</li>
<li>
<a href="../elements/voice-layout/">&lt;voice-layout&gt;</a>
<ul class="nestedul">
<li>
<a href="../elements/part-layout/">&lt;part-layout&gt;</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
Expand All @@ -125,6 +133,14 @@ <h1>Elements used in MNX</h1>
<li>
<a href="../elements/part-layout/">&lt;part-layout&gt;</a>
</li>
<li>
<a href="../elements/voice-layout/">&lt;voice-layout&gt;</a>
<ul class="nestedul">
<li>
<a href="../elements/part-layout/">&lt;part-layout&gt;</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -315,6 +331,11 @@ <h1>Elements used in MNX</h1>
<ul class="nestedul">
<li>
<a href="../elements/system/">&lt;system&gt;</a>
<ul class="nestedul">
<li>
<a href="../elements/system-layout-change/">&lt;system-layout-change&gt;</a>
</li>
</ul>
</li>
</ul>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/mnx-reference/elements/beam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ <h2 id="examples">Examples</h2>

<p>This element is used in the following examples:</p>
<p>
<nobr><a href="../../examples/beams/">Beams</a></nobr>, <nobr><a href="../../examples/beams-across-barlines/">Beams (across barlines)</a></nobr>, <nobr><a href="../../examples/beam-hooks/">Beams (hooks)</a></nobr>, <nobr><a href="../../examples/beams-secondary-beam-breaks/">Beams (secondary beam breaks)</a></nobr>, <nobr><a href="../../examples/beams-inner-grace-notes/">Beams (with inner grace notes)</a></nobr>, <nobr><a href="../../examples/grace-notes-beamed/">Grace notes (beamed)</a></nobr>, <nobr><a href="../../examples/parts/">Parts</a></nobr>, <nobr><a href="../../examples/tuplets/">Tuplets</a></nobr>
<nobr><a href="../../examples/beams/">Beams</a></nobr>, <nobr><a href="../../examples/beams-across-barlines/">Beams (across barlines)</a></nobr>, <nobr><a href="../../examples/beam-hooks/">Beams (hooks)</a></nobr>, <nobr><a href="../../examples/beams-secondary-beam-breaks/">Beams (secondary beam breaks)</a></nobr>, <nobr><a href="../../examples/beams-inner-grace-notes/">Beams (with inner grace notes)</a></nobr>, <nobr><a href="../../examples/grace-notes-beamed/">Grace notes (beamed)</a></nobr>, <nobr><a href="../../examples/organ-layout/">Organ layout</a></nobr>, <nobr><a href="../../examples/parts/">Parts</a></nobr>, <nobr><a href="../../examples/tuplets/">Tuplets</a></nobr>
</p>


Expand Down
2 changes: 1 addition & 1 deletion docs/mnx-reference/elements/beams/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ <h2 id="examples">Examples</h2>

<p>This element is used in the following examples:</p>
<p>
<nobr><a href="../../examples/beams/">Beams</a></nobr>, <nobr><a href="../../examples/beams-across-barlines/">Beams (across barlines)</a></nobr>, <nobr><a href="../../examples/beam-hooks/">Beams (hooks)</a></nobr>, <nobr><a href="../../examples/beams-secondary-beam-breaks/">Beams (secondary beam breaks)</a></nobr>, <nobr><a href="../../examples/beams-inner-grace-notes/">Beams (with inner grace notes)</a></nobr>, <nobr><a href="../../examples/grace-notes-beamed/">Grace notes (beamed)</a></nobr>, <nobr><a href="../../examples/parts/">Parts</a></nobr>, <nobr><a href="../../examples/tuplets/">Tuplets</a></nobr>
<nobr><a href="../../examples/beams/">Beams</a></nobr>, <nobr><a href="../../examples/beams-across-barlines/">Beams (across barlines)</a></nobr>, <nobr><a href="../../examples/beam-hooks/">Beams (hooks)</a></nobr>, <nobr><a href="../../examples/beams-secondary-beam-breaks/">Beams (secondary beam breaks)</a></nobr>, <nobr><a href="../../examples/beams-inner-grace-notes/">Beams (with inner grace notes)</a></nobr>, <nobr><a href="../../examples/grace-notes-beamed/">Grace notes (beamed)</a></nobr>, <nobr><a href="../../examples/organ-layout/">Organ layout</a></nobr>, <nobr><a href="../../examples/parts/">Parts</a></nobr>, <nobr><a href="../../examples/tuplets/">Tuplets</a></nobr>
</p>


Expand Down
2 changes: 1 addition & 1 deletion docs/mnx-reference/elements/clef/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ <h2 id="examples">Examples</h2>

<p>This element is used in the following examples:</p>
<p>
<nobr><a href="../../examples/accidentals/">Accidentals</a></nobr>, <nobr><a href="../../examples/beams/">Beams</a></nobr>, <nobr><a href="../../examples/beams-across-barlines/">Beams (across barlines)</a></nobr>, <nobr><a href="../../examples/beam-hooks/">Beams (hooks)</a></nobr>, <nobr><a href="../../examples/beams-secondary-beam-breaks/">Beams (secondary beam breaks)</a></nobr>, <nobr><a href="../../examples/beams-inner-grace-notes/">Beams (with inner grace notes)</a></nobr>, <nobr><a href="../../examples/dotted-notes/">Dotted notes (augmentation dots)</a></nobr>, <nobr><a href="../../examples/grace-note/">Grace note</a></nobr>, <nobr><a href="../../examples/grace-notes-beamed/">Grace notes (beamed)</a></nobr>, <nobr><a href="../../examples/jumps-ds-al-fine/">Jumps (D.S. al Fine)</a></nobr>, <nobr><a href="../../examples/jumps-dal-segno/">Jumps (Dal Segno)</a></nobr>, <nobr><a href="../../examples/key-signatures/">Key signatures</a></nobr>, <nobr><a href="../../examples/multiple-voices/">Multiple voices</a></nobr>, <nobr><a href="../../examples/octave-shifts-8va/">Octave shifts (8va)</a></nobr>, <nobr><a href="../../examples/parts/">Parts</a></nobr>, <nobr><a href="../../examples/repeats/">Repeats</a></nobr>, <nobr><a href="../../examples/repeats-more-once-repeated/">Repeats (more than once repeated)</a></nobr>, <nobr><a href="../../examples/repeats-alternate-endings-advanced/">Repeats (with alternate endings, advanced)</a></nobr>, <nobr><a href="../../examples/repeats-alternate-endings-simple/">Repeats (with alternate endings, simple)</a></nobr>, <nobr><a href="../../examples/repeats-implied-start-repeat/">Repeats (with implied start repeat)</a></nobr>, <nobr><a href="../../examples/slurs/">Slurs</a></nobr>, <nobr><a href="../../examples/slurs-chords/">Slurs (for chords)</a></nobr>, <nobr><a href="../../examples/slurs-incomplete-slurs/">Slurs (incomplete slurs)</a></nobr>, <nobr><a href="../../examples/slurs-targeting-specific-notes/">Slurs (targeting specific notes)</a></nobr>, <nobr><a href="../../examples/tempo-markings/">Tempo markings</a></nobr>, <nobr><a href="../../examples/three-note-chord-and-half-rest/">Three-note chord and half rest</a></nobr>, <nobr><a href="../../examples/ties/">Ties</a></nobr>, <nobr><a href="../../examples/time-signatures/">Time signatures</a></nobr>, <nobr><a href="../../examples/tuplets/">Tuplets</a></nobr>, <nobr><a href="../../examples/two-bar-c-major-scale/">Two-bar C major scale</a></nobr>, <nobr><a href="../../examples/hello-world/">“Hello world”</a></nobr>
<nobr><a href="../../examples/accidentals/">Accidentals</a></nobr>, <nobr><a href="../../examples/beams/">Beams</a></nobr>, <nobr><a href="../../examples/beams-across-barlines/">Beams (across barlines)</a></nobr>, <nobr><a href="../../examples/beam-hooks/">Beams (hooks)</a></nobr>, <nobr><a href="../../examples/beams-secondary-beam-breaks/">Beams (secondary beam breaks)</a></nobr>, <nobr><a href="../../examples/beams-inner-grace-notes/">Beams (with inner grace notes)</a></nobr>, <nobr><a href="../../examples/dotted-notes/">Dotted notes (augmentation dots)</a></nobr>, <nobr><a href="../../examples/grace-note/">Grace note</a></nobr>, <nobr><a href="../../examples/grace-notes-beamed/">Grace notes (beamed)</a></nobr>, <nobr><a href="../../examples/jumps-ds-al-fine/">Jumps (D.S. al Fine)</a></nobr>, <nobr><a href="../../examples/jumps-dal-segno/">Jumps (Dal Segno)</a></nobr>, <nobr><a href="../../examples/key-signatures/">Key signatures</a></nobr>, <nobr><a href="../../examples/multiple-layouts/">Multiple layouts</a></nobr>, <nobr><a href="../../examples/multiple-voices/">Multiple voices</a></nobr>, <nobr><a href="../../examples/octave-shifts-8va/">Octave shifts (8va)</a></nobr>, <nobr><a href="../../examples/organ-layout/">Organ layout</a></nobr>, <nobr><a href="../../examples/parts/">Parts</a></nobr>, <nobr><a href="../../examples/repeats/">Repeats</a></nobr>, <nobr><a href="../../examples/repeats-more-once-repeated/">Repeats (more than once repeated)</a></nobr>, <nobr><a href="../../examples/repeats-alternate-endings-advanced/">Repeats (with alternate endings, advanced)</a></nobr>, <nobr><a href="../../examples/repeats-alternate-endings-simple/">Repeats (with alternate endings, simple)</a></nobr>, <nobr><a href="../../examples/repeats-implied-start-repeat/">Repeats (with implied start repeat)</a></nobr>, <nobr><a href="../../examples/slurs/">Slurs</a></nobr>, <nobr><a href="../../examples/slurs-chords/">Slurs (for chords)</a></nobr>, <nobr><a href="../../examples/slurs-incomplete-slurs/">Slurs (incomplete slurs)</a></nobr>, <nobr><a href="../../examples/slurs-targeting-specific-notes/">Slurs (targeting specific notes)</a></nobr>, <nobr><a href="../../examples/tempo-markings/">Tempo markings</a></nobr>, <nobr><a href="../../examples/three-note-chord-and-half-rest/">Three-note chord and half rest</a></nobr>, <nobr><a href="../../examples/ties/">Ties</a></nobr>, <nobr><a href="../../examples/time-signatures/">Time signatures</a></nobr>, <nobr><a href="../../examples/tuplets/">Tuplets</a></nobr>, <nobr><a href="../../examples/two-bar-c-major-scale/">Two-bar C major scale</a></nobr>, <nobr><a href="../../examples/hello-world/">“Hello world”</a></nobr>
</p>


Expand Down
Loading

0 comments on commit 9d19e1b

Please sign in to comment.