Skip to content

Commit

Permalink
Fixed organ-layout example to use new key for layoutChanges.
Browse files Browse the repository at this point in the history
Fixes #336.
  • Loading branch information
adrianholovaty committed May 7, 2024
1 parent 3ea57c5 commit 5d4429e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
10 changes: 9 additions & 1 deletion docgenerator/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -5076,7 +5076,7 @@
"slug": "organ-layout",
"schema": 1,
"blurb": "Note only the music in the first measure is encoded here.",
"document": "{\r\n\"mnx\": {\"version\": 1},\r\n \"global\": {\r\n \"measures\": [\r\n {\r\n \"key\": {\"fifths\": -3},\r\n \"time\": {\"count\": 3, \"unit\": 4}\r\n }\r\n ]\r\n },\r\n \"parts\": [\r\n {\r\n \"id\": \"organ\",\r\n \"staves\": 3,\r\n \"measures\": [\r\n {\r\n \"clefs\": [\r\n {\"clef\": {\"sign\": \"G\", \"staffPosition\": -2}}\r\n ],\r\n \"sequences\": [\r\n {\r\n \"staff\": 1,\r\n \"voice\": \"Main\",\r\n \"content\": [\r\n {\r\n \"type\": \"event\",\r\n \"duration\": {\"base\": \"quarter\"},\r\n \"rest\": {}\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"rest\": {}\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"id\": \"main1\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"notes\": [\r\n {\"pitch\": {\"step\": \"G\", \"octave\": 4}}\r\n ]\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"id\": \"main2\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"notes\": [\r\n {\r\n \"pitch\": {\"step\": \"F\", \"octave\": 4, \"alter\": 1},\r\n \"accidentalDisplay\": {\"show\": true}\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"id\": \"main3\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"notes\": [\r\n {\r\n \"pitch\": {\"step\": \"A\", \"octave\": 4},\r\n \"accidentalDisplay\": {\"show\": true}\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"staff\": 1,\r\n \"voice\": \"Oberwerk\",\r\n \"content\": [\r\n {\r\n \"type\": \"event\",\r\n \"duration\": {\"base\": \"quarter\"},\r\n \"rest\": {}\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"rest\": {}\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"id\": \"ober1\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"notes\": [\r\n {\"pitch\": {\"step\": \"B\", \"octave\": 3, \"alter\": -1}}\r\n ]\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"id\": \"ober2\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"notes\": [\r\n {\r\n \"pitch\": {\"step\": \"A\", \"octave\": 3},\r\n \"accidentalDisplay\": {\"show\": true}\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"id\": \"ober3\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"notes\": [\r\n {\"pitch\": {\"step\": \"C\", \"octave\": 4}}\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"staff\": 2,\r\n \"voice\": \"Hauptwerk\",\r\n \"content\": [\r\n {\r\n \"type\": \"event\",\r\n \"duration\": {\"base\": \"half\", \"dots\": 1},\r\n \"rest\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"staff\": 3,\r\n \"voice\": \"Pedal\",\r\n \"content\": [\r\n {\r\n \"type\": \"event\",\r\n \"duration\": {\"base\": \"half\", \"dots\": 1},\r\n \"notes\": [\r\n {\"pitch\": {\"step\": \"E\", \"octave\": 3, \"alter\": -1}, \"tie\": {\"target\": \"pedNote2\"}}\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"layouts\": [\r\n {\r\n \"id\": \"organ3Staff\",\r\n \"content\": [\r\n {\r\n \"type\": \"group\",\r\n \"symbol\": \"brace\",\r\n \"content\": [\r\n {\r\n \"type\": \"staff\",\r\n \"sources\": [\r\n {\"part\": \"organ\", \"staff\": 1}\r\n ]\r\n },\r\n {\r\n \"type\": \"staff\",\r\n \"sources\": [\r\n {\"part\": \"organ\", \"staff\": 2}\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"staff\",\r\n \"sources\": [\r\n {\"part\": \"organ\", \"staff\": 3}\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"organ3StaffSplitOber\",\r\n \"content\": [\r\n {\r\n \"type\": \"group\",\r\n \"content\": [\r\n {\r\n \"type\": \"staff\",\r\n \"sources\": [\r\n {\"part\": \"organ\", \"voice\": \"Main\", \"stem\": \"up\"},\r\n {\"part\": \"organ\", \"voice\": \"Oberwerk\", \"stem\": \"down\"}\r\n ]\r\n },\r\n {\r\n \"type\": \"staff\",\r\n \"sources\": [\r\n {\"part\": \"organ\", \"voice\": \"Hauptwerk\"}\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"staff\",\r\n \"sources\": [\r\n {\"part\": \"organ\", \"staff\": 3}\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"scores\": [\r\n {\r\n \"name\": \"defaultScore\",\r\n \"pages\": [\r\n {\r\n \"systems\": [\r\n {\"layout\": \"organ3Staff\", \"measure\": 1, \"layout-changes\": [{\"layout\": \"organ3StaffSplitOber\", \"location\": \"1:3/8\"}]},\r\n {\"layout\": \"organ3StaffSplitOber\", \"measure\": 6}\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n}",
"document": "{\r\n\"mnx\": {\"version\": 1},\r\n \"global\": {\r\n \"measures\": [\r\n {\r\n \"key\": {\"fifths\": -3},\r\n \"time\": {\"count\": 3, \"unit\": 4}\r\n }\r\n ]\r\n },\r\n \"parts\": [\r\n {\r\n \"id\": \"organ\",\r\n \"staves\": 3,\r\n \"measures\": [\r\n {\r\n \"clefs\": [\r\n {\"clef\": {\"sign\": \"G\", \"staffPosition\": -2}}\r\n ],\r\n \"sequences\": [\r\n {\r\n \"staff\": 1,\r\n \"voice\": \"Main\",\r\n \"content\": [\r\n {\r\n \"type\": \"event\",\r\n \"duration\": {\"base\": \"quarter\"},\r\n \"rest\": {}\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"rest\": {}\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"id\": \"main1\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"notes\": [\r\n {\"pitch\": {\"step\": \"G\", \"octave\": 4}}\r\n ]\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"id\": \"main2\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"notes\": [\r\n {\r\n \"pitch\": {\"step\": \"F\", \"octave\": 4, \"alter\": 1},\r\n \"accidentalDisplay\": {\"show\": true}\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"id\": \"main3\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"notes\": [\r\n {\r\n \"pitch\": {\"step\": \"A\", \"octave\": 4},\r\n \"accidentalDisplay\": {\"show\": true}\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"staff\": 1,\r\n \"voice\": \"Oberwerk\",\r\n \"content\": [\r\n {\r\n \"type\": \"event\",\r\n \"duration\": {\"base\": \"quarter\"},\r\n \"rest\": {}\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"rest\": {}\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"id\": \"ober1\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"notes\": [\r\n {\"pitch\": {\"step\": \"B\", \"octave\": 3, \"alter\": -1}}\r\n ]\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"id\": \"ober2\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"notes\": [\r\n {\r\n \"pitch\": {\"step\": \"A\", \"octave\": 3},\r\n \"accidentalDisplay\": {\"show\": true}\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"event\",\r\n \"id\": \"ober3\",\r\n \"duration\": {\"base\": \"eighth\"},\r\n \"notes\": [\r\n {\"pitch\": {\"step\": \"C\", \"octave\": 4}}\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"staff\": 2,\r\n \"voice\": \"Hauptwerk\",\r\n \"content\": [\r\n {\r\n \"type\": \"event\",\r\n \"duration\": {\"base\": \"half\", \"dots\": 1},\r\n \"rest\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"staff\": 3,\r\n \"voice\": \"Pedal\",\r\n \"content\": [\r\n {\r\n \"type\": \"event\",\r\n \"duration\": {\"base\": \"half\", \"dots\": 1},\r\n \"notes\": [\r\n {\"pitch\": {\"step\": \"E\", \"octave\": 3, \"alter\": -1}, \"tie\": {\"target\": \"pedNote2\"}}\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"layouts\": [\r\n {\r\n \"id\": \"organ3Staff\",\r\n \"content\": [\r\n {\r\n \"type\": \"group\",\r\n \"symbol\": \"brace\",\r\n \"content\": [\r\n {\r\n \"type\": \"staff\",\r\n \"sources\": [\r\n {\"part\": \"organ\", \"staff\": 1}\r\n ]\r\n },\r\n {\r\n \"type\": \"staff\",\r\n \"sources\": [\r\n {\"part\": \"organ\", \"staff\": 2}\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"staff\",\r\n \"sources\": [\r\n {\"part\": \"organ\", \"staff\": 3}\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"organ3StaffSplitOber\",\r\n \"content\": [\r\n {\r\n \"type\": \"group\",\r\n \"content\": [\r\n {\r\n \"type\": \"staff\",\r\n \"sources\": [\r\n {\"part\": \"organ\", \"voice\": \"Main\", \"stem\": \"up\"},\r\n {\"part\": \"organ\", \"voice\": \"Oberwerk\", \"stem\": \"down\"}\r\n ]\r\n },\r\n {\r\n \"type\": \"staff\",\r\n \"sources\": [\r\n {\"part\": \"organ\", \"voice\": \"Hauptwerk\"}\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"staff\",\r\n \"sources\": [\r\n {\"part\": \"organ\", \"staff\": 3}\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"scores\": [\r\n {\r\n \"name\": \"defaultScore\",\r\n \"pages\": [\r\n {\r\n \"systems\": [\r\n {\"layout\": \"organ3Staff\", \"measure\": 1, \"layoutChanges\": [{\"layout\": \"organ3StaffSplitOber\", \"location\": \"1:3/8\"}]},\r\n {\"layout\": \"organ3StaffSplitOber\", \"measure\": 6}\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n}",
"image_url": "/static/examples/organ-layout.png",
"is_featured": false
}
Expand Down Expand Up @@ -14632,6 +14632,14 @@
"json_object": 36
}
},
{
"model": "spec.exampledocumentobject",
"pk": 1341,
"fields": {
"example": 35,
"json_object": 36
}
},
{
"model": "spec.staticpagecollection",
"pk": 1,
Expand Down
7 changes: 6 additions & 1 deletion docs/mnx-reference/examples/organ-layout/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,12 @@ <h1>Organ layout</h1>
<a class="tag" href="../../objects/page/">"systems"</a>: [
{
<a class="tag" href="../../objects/system/">"layout"</a>: <a class="tag" href="../../objects/id/">"organ3Staff"</a>,
<a class="tag" href="../../objects/system/">"layout-changes"</a>: <span class="tag">[{"layout": "organ3StaffSplitOber", "location": "1:3/8"}]</span>,
<a class="tag" href="../../objects/system/">"layoutChanges"</a>: [
{
<a class="tag" href="../../objects/layout-change/">"layout"</a>: <a class="tag" href="../../objects/id/">"organ3StaffSplitOber"</a>,
<a class="tag" href="../../objects/layout-change/">"location"</a>: <a class="tag" href="../../objects/measure-location/">"1:3/8"</a>
}
],
<a class="tag" href="../../objects/system/">"measure"</a>: <a class="tag" href="../../objects/measure-number/">1</a>
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/mnx-reference/objects/tie/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h2 id="examples">Examples</h2>

<p>This object is used in the following examples:</p>
<p>
<nobr><a href="../../examples/ties/">Ties</a></nobr>
<nobr><a href="../../examples/organ-layout/">Organ layout</a></nobr>, <nobr><a href="../../examples/ties/">Ties</a></nobr>
</p>


Expand Down

0 comments on commit 5d4429e

Please sign in to comment.