Skip to content

Commit

Permalink
Added event markings object
Browse files Browse the repository at this point in the history
The new event.markings object is a place for event-level markings, such as articulations and tremolos.

The currently defined markings are:

* accent
* breath
* softAccent
* spiccato
* staccatissimo
* staccato
* stress
* strongAccent
* tenuto
* tremolo
* unstress

This also includes two new example documents, "Articulations" and "Single-note tremolos."
  • Loading branch information
adrianholovaty committed Feb 28, 2024
1 parent 76193f4 commit f9ab654
Show file tree
Hide file tree
Showing 46 changed files with 2,561 additions and 29 deletions.
794 changes: 787 additions & 7 deletions docgenerator/data.json

Large diffs are not rendered by default.

Binary file added docgenerator/media/examples/articulations.png
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/tremolos.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
181 changes: 181 additions & 0 deletions docs/mnx-reference/examples/articulations/index.html
@@ -0,0 +1,181 @@

<!DOCTYPE html>
<html lang="en">
<head>
<title>MNX example: Articulations | 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">

<style>
.diff * { font-weight: bold; color: blue !important; }
</style>

</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="../../objects/">Reference</a>
<ul>
<li><a href="../../objects/">Objects</a></li>
<li><a href="../">Example documents</a></li>
<li><a href="../../../mnx-schema.json">Raw JSON Schema</a></li>
</ul>
</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="../">Examples</a> &gt;
Articulations
</p>

<h1>Articulations</h1>


<p><img src="../../../static/examples/articulations.png"></p>



<p>Articulations live on an event. They&#x27;re encoded in the event&#x27;s &quot;markings&quot; object.</p>






<div class="xmlmarkup">{
<a class="tag" href="../../objects/root/">"mnx"</a>: {
<a class="tag" href="../../objects/mnx/">"version"</a>: <a class="tag" href="../../objects/version-number/">1</a>
},
<a class="tag" href="../../objects/root/">"global"</a>: {
<a class="tag" href="../../objects/global/">"measures"</a>: [
{
<a class="tag" href="../../objects/measure-global/">"time"</a>: {
<a class="tag" href="../../objects/time/">"count"</a>: <a class="tag" href="../../objects/positive-integer/">4</a>,
<a class="tag" href="../../objects/time/">"unit"</a>: <a class="tag" href="../../objects/time-signature-unit/">4</a>
}
}
]
},
<a class="tag" href="../../objects/root/">"parts"</a>: [
{
<a class="tag" href="../../objects/part/">"measures"</a>: [
{
<a class="tag" href="../../objects/part-measure/">"clefs"</a>: [
{
<a class="tag" href="../../objects/positioned-clef/">"clef"</a>: {
<a class="tag" href="../../objects/clef/">"position"</a>: <a class="tag" href="../../objects/staff-position/">-2</a>,
<a class="tag" href="../../objects/clef/">"sign"</a>: <a class="tag" href="../../objects/clef-sign/">"G"</a>
}
}
],
<a class="tag" href="../../objects/part-measure/">"sequences"</a>: [
{
<a class="tag" href="../../objects/sequence/">"content"</a>: [
{
<a class="tag" href="../../objects/event/">"type"</a>: "event",
<a class="tag" href="../../objects/event/">"duration"</a>: {
<a class="tag" href="../../objects/note-value/">"base"</a>: <a class="tag" href="../../objects/note-value-base/">"quarter"</a>
},
<a class="tag" href="../../objects/event/">"markings"</a>: {
<a class="tag" href="../../objects/event-markings/">"staccato"</a>: {}
},
<a class="tag" href="../../objects/event/">"notes"</a>: [
{
<a class="tag" href="../../objects/note/">"pitch"</a>: {
<a class="tag" href="../../objects/pitch/">"octave"</a>: <a class="tag" href="../../objects/octave/">5</a>,
<a class="tag" href="../../objects/pitch/">"step"</a>: <a class="tag" href="../../objects/step/">"E"</a>
}
}
]
},
{
<a class="tag" href="../../objects/event/">"type"</a>: "event",
<a class="tag" href="../../objects/event/">"duration"</a>: {
<a class="tag" href="../../objects/note-value/">"base"</a>: <a class="tag" href="../../objects/note-value-base/">"quarter"</a>
},
<a class="tag" href="../../objects/event/">"markings"</a>: {
<a class="tag" href="../../objects/event-markings/">"tenuto"</a>: {}
},
<a class="tag" href="../../objects/event/">"notes"</a>: [
{
<a class="tag" href="../../objects/note/">"pitch"</a>: {
<a class="tag" href="../../objects/pitch/">"octave"</a>: <a class="tag" href="../../objects/octave/">5</a>,
<a class="tag" href="../../objects/pitch/">"step"</a>: <a class="tag" href="../../objects/step/">"E"</a>
}
}
]
},
{
<a class="tag" href="../../objects/event/">"type"</a>: "event",
<a class="tag" href="../../objects/event/">"duration"</a>: {
<a class="tag" href="../../objects/note-value/">"base"</a>: <a class="tag" href="../../objects/note-value-base/">"quarter"</a>
},
<a class="tag" href="../../objects/event/">"markings"</a>: {
<a class="tag" href="../../objects/event-markings/">"accent"</a>: {}
},
<a class="tag" href="../../objects/event/">"notes"</a>: [
{
<a class="tag" href="../../objects/note/">"pitch"</a>: {
<a class="tag" href="../../objects/pitch/">"octave"</a>: <a class="tag" href="../../objects/octave/">5</a>,
<a class="tag" href="../../objects/pitch/">"step"</a>: <a class="tag" href="../../objects/step/">"E"</a>
}
}
]
},
{
<a class="tag" href="../../objects/event/">"type"</a>: "event",
<a class="tag" href="../../objects/event/">"duration"</a>: {
<a class="tag" href="../../objects/note-value/">"base"</a>: <a class="tag" href="../../objects/note-value-base/">"quarter"</a>
},
<a class="tag" href="../../objects/event/">"markings"</a>: {
<a class="tag" href="../../objects/event-markings/">"strongAccent"</a>: {}
},
<a class="tag" href="../../objects/event/">"notes"</a>: [
{
<a class="tag" href="../../objects/note/">"pitch"</a>: {
<a class="tag" href="../../objects/pitch/">"octave"</a>: <a class="tag" href="../../objects/octave/">5</a>,
<a class="tag" href="../../objects/pitch/">"step"</a>: <a class="tag" href="../../objects/step/">"E"</a>
}
}
]
}
]
}
]
}
]
}
]
}</div>

</main>
</div>


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

</body>
</html>
18 changes: 18 additions & 0 deletions docs/mnx-reference/examples/index.html
Expand Up @@ -58,6 +58,15 @@ <h1>MNX example documents</h1>
</a>
</div>

<div style="margin-bottom: 40px;">
<a href="articulations/">

<img src="../../static/examples/articulations.png" loading="lazy"><br>

Articulations
</a>
</div>

<div style="margin-bottom: 40px;">
<a href="beams/">

Expand Down Expand Up @@ -382,6 +391,15 @@ <h1>MNX example documents</h1>
</a>
</div>

<div style="margin-bottom: 40px;">
<a href="single-note-tremolos/">

<img src="../../static/examples/tremolos.png" loading="lazy"><br>

Tremolos (single-note)
</a>
</div>

<div style="margin-bottom: 40px;">
<a href="tuplets/">

Expand Down
184 changes: 184 additions & 0 deletions docs/mnx-reference/examples/single-note-tremolos/index.html
@@ -0,0 +1,184 @@

<!DOCTYPE html>
<html lang="en">
<head>
<title>MNX example: Tremolos (single-note) | 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">

<style>
.diff * { font-weight: bold; color: blue !important; }
</style>

</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="../../objects/">Reference</a>
<ul>
<li><a href="../../objects/">Objects</a></li>
<li><a href="../">Example documents</a></li>
<li><a href="../../../mnx-schema.json">Raw JSON Schema</a></li>
</ul>
</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="../">Examples</a> &gt;
Tremolos (single-note)
</p>

<h1>Tremolos (single-note)</h1>


<p><img src="../../../static/examples/tremolos.png"></p>



<p>Single-note tremolos live on an event. They&#x27;re encoded in the event&#x27;s &quot;markings&quot; object. Each tremolo must encode the number of visible marks — 1, 2 and 3 in this example.</p>






<div class="xmlmarkup">{
<a class="tag" href="../../objects/root/">"mnx"</a>: {
<a class="tag" href="../../objects/mnx/">"version"</a>: <a class="tag" href="../../objects/version-number/">1</a>
},
<a class="tag" href="../../objects/root/">"global"</a>: {
<a class="tag" href="../../objects/global/">"measures"</a>: [
{
<a class="tag" href="../../objects/measure-global/">"time"</a>: {
<a class="tag" href="../../objects/time/">"count"</a>: <a class="tag" href="../../objects/positive-integer/">4</a>,
<a class="tag" href="../../objects/time/">"unit"</a>: <a class="tag" href="../../objects/time-signature-unit/">4</a>
}
}
]
},
<a class="tag" href="../../objects/root/">"parts"</a>: [
{
<a class="tag" href="../../objects/part/">"measures"</a>: [
{
<a class="tag" href="../../objects/part-measure/">"clefs"</a>: [
{
<a class="tag" href="../../objects/positioned-clef/">"clef"</a>: {
<a class="tag" href="../../objects/clef/">"position"</a>: <a class="tag" href="../../objects/staff-position/">-2</a>,
<a class="tag" href="../../objects/clef/">"sign"</a>: <a class="tag" href="../../objects/clef-sign/">"G"</a>
}
}
],
<a class="tag" href="../../objects/part-measure/">"sequences"</a>: [
{
<a class="tag" href="../../objects/sequence/">"content"</a>: [
{
<a class="tag" href="../../objects/event/">"type"</a>: "event",
<a class="tag" href="../../objects/event/">"duration"</a>: {
<a class="tag" href="../../objects/note-value/">"base"</a>: <a class="tag" href="../../objects/note-value-base/">"quarter"</a>
},
<a class="tag" href="../../objects/event/">"notes"</a>: [
{
<a class="tag" href="../../objects/note/">"pitch"</a>: {
<a class="tag" href="../../objects/pitch/">"octave"</a>: <a class="tag" href="../../objects/octave/">5</a>,
<a class="tag" href="../../objects/pitch/">"step"</a>: <a class="tag" href="../../objects/step/">"C"</a>
}
}
]
},
{
<a class="tag" href="../../objects/event/">"type"</a>: "event",
<a class="tag" href="../../objects/event/">"duration"</a>: {
<a class="tag" href="../../objects/note-value/">"base"</a>: <a class="tag" href="../../objects/note-value-base/">"quarter"</a>
},
<a class="tag" href="../../objects/event/">"markings"</a>: {
<a class="tag" href="../../objects/event-markings/">"tremolo"</a>: {
<a class="tag" href="../../objects/tremolo-single/">"marks"</a>: <a class="tag" href="../../objects/positive-integer/">1</a>
}
},
<a class="tag" href="../../objects/event/">"notes"</a>: [
{
<a class="tag" href="../../objects/note/">"pitch"</a>: {
<a class="tag" href="../../objects/pitch/">"octave"</a>: <a class="tag" href="../../objects/octave/">5</a>,
<a class="tag" href="../../objects/pitch/">"step"</a>: <a class="tag" href="../../objects/step/">"C"</a>
}
}
]
},
{
<a class="tag" href="../../objects/event/">"type"</a>: "event",
<a class="tag" href="../../objects/event/">"duration"</a>: {
<a class="tag" href="../../objects/note-value/">"base"</a>: <a class="tag" href="../../objects/note-value-base/">"quarter"</a>
},
<a class="tag" href="../../objects/event/">"markings"</a>: {
<a class="tag" href="../../objects/event-markings/">"tremolo"</a>: {
<a class="tag" href="../../objects/tremolo-single/">"marks"</a>: <a class="tag" href="../../objects/positive-integer/">2</a>
}
},
<a class="tag" href="../../objects/event/">"notes"</a>: [
{
<a class="tag" href="../../objects/note/">"pitch"</a>: {
<a class="tag" href="../../objects/pitch/">"octave"</a>: <a class="tag" href="../../objects/octave/">5</a>,
<a class="tag" href="../../objects/pitch/">"step"</a>: <a class="tag" href="../../objects/step/">"C"</a>
}
}
]
},
{
<a class="tag" href="../../objects/event/">"type"</a>: "event",
<a class="tag" href="../../objects/event/">"duration"</a>: {
<a class="tag" href="../../objects/note-value/">"base"</a>: <a class="tag" href="../../objects/note-value-base/">"quarter"</a>
},
<a class="tag" href="../../objects/event/">"markings"</a>: {
<a class="tag" href="../../objects/event-markings/">"tremolo"</a>: {
<a class="tag" href="../../objects/tremolo-single/">"marks"</a>: <a class="tag" href="../../objects/positive-integer/">3</a>
}
},
<a class="tag" href="../../objects/event/">"notes"</a>: [
{
<a class="tag" href="../../objects/note/">"pitch"</a>: {
<a class="tag" href="../../objects/pitch/">"octave"</a>: <a class="tag" href="../../objects/octave/">5</a>,
<a class="tag" href="../../objects/pitch/">"step"</a>: <a class="tag" href="../../objects/step/">"C"</a>
}
}
]
}
]
}
]
}
]
}
]
}</div>

</main>
</div>


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

</body>
</html>

0 comments on commit f9ab654

Please sign in to comment.