Skip to content

Commit

Permalink
Merge pull request #196 from w3c/44-brass
Browse files Browse the repository at this point in the history
44: Add SMuFL brass techniques
  • Loading branch information
Michael Good committed Mar 29, 2017
2 parents f2341f8 + 4ea7fd1 commit 7e4051e
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 6 deletions.
7 changes: 6 additions & 1 deletion schema/common.mod
Expand Up @@ -521,14 +521,19 @@
The line-shape entity is used to distinguish between
straight and curved lines. The line-type entity
distinguishes between solid, dashed, dotted, and
wavy lines.
wavy lines. The line-length entity distinguishes
between different line lengths for doit, falloff,
plop, and scoop articulations.
-->
<!ENTITY % line-shape
"line-shape (straight | curved) #IMPLIED">

<!ENTITY % line-type
"line-type (solid | dashed | dotted | wavy) #IMPLIED">

<!ENTITY % line-length
"line-length (short | medium | long) #IMPLIED">

<!--
The dashed-formatting entity represents the length of
dashes and spaces in a dashed line. Both the dash-length
Expand Down
92 changes: 91 additions & 1 deletion schema/musicxml.xsd
Expand Up @@ -177,6 +177,17 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).<
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="line-length">
<xs:annotation>
<xs:documentation>The line-length type distinguishes between different line lengths for doit, falloff, plop, and scoop articulations.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="short"/>
<xs:enumeration value="medium"/>
<xs:enumeration value="long"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="line-shape">
<xs:annotation>
<xs:documentation>The line-shape type distinguishes between straight and curved lines.</xs:documentation>
Expand Down Expand Up @@ -1541,6 +1552,29 @@ A quarter-rest type specifies the glyph to use when a note has a rest element an
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="harmon-closed-location">
<xs:annotation>
<xs:documentation>The harmon-closed-location type indicates which portion of the symbol is filled in when the corresponding harmon-closed-value is half.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="right"/>
<xs:enumeration value="bottom"/>
<xs:enumeration value="left"/>
<xs:enumeration value="top"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="harmon-closed-value">
<xs:annotation>
<xs:documentation>The harmon-closed-value type represents whether the harmon mute is closed, open, or half-open.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="yes"/>
<xs:enumeration value="no"/>
<xs:enumeration value="half"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="hole-closed-location">
<xs:annotation>
<xs:documentation>The hole-closed-location type indicates which portion of the hole is filled in when the corresponding hole-closed-value is half.</xs:documentation>
Expand Down Expand Up @@ -1859,6 +1893,13 @@ The halign attribute is used in these situations. If it is not present, its valu
<xs:attribute name="line-height" type="number-or-normal"/>
</xs:attributeGroup>

<xs:attributeGroup name="line-length">
<xs:annotation>
<xs:documentation>The line-length attribute distinguishes between different line lengths for doit, falloff, plop, and scoop articulations.</xs:documentation>
</xs:annotation>
<xs:attribute name="line-length" type="line-length"/>
</xs:attributeGroup>

<xs:attributeGroup name="line-shape">
<xs:annotation>
<xs:documentation>The line-shape attribute distinguishes between straight and curved lines.</xs:documentation>
Expand Down Expand Up @@ -4325,10 +4366,11 @@ The repeater attribute has been deprecated in MusicXML 3.0. Formerly used for tr

<xs:complexType name="empty-line">
<xs:annotation>
<xs:documentation>The empty-line type represents an empty element with line-shape, line-type, dashed-formatting, print-style and placement attributes.</xs:documentation>
<xs:documentation>The empty-line type represents an empty element with line-shape, line-type, line-length, dashed-formatting, print-style and placement attributes.</xs:documentation>
</xs:annotation>
<xs:attributeGroup ref="line-shape"/>
<xs:attributeGroup ref="line-type"/>
<xs:attributeGroup ref="line-length"/>
<xs:attributeGroup ref="dashed-formatting"/>
<xs:attributeGroup ref="print-style"/>
<xs:attributeGroup ref="placement"/>
Expand Down Expand Up @@ -4447,6 +4489,28 @@ Figures are ordered from top to bottom. The value of parentheses is "no" if not
</xs:simpleContent>
</xs:complexType>

<xs:complexType name="harmon-closed">
<xs:annotation>
<xs:documentation>The harmon-closed type represents whether the harmon mute is closed, open, or half-open. The optional location attribute indicates which portion of the symbol is filled in when the element value is half.</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="harmon-closed-value">
<xs:attribute name="location" type="harmon-closed-location"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>

<xs:complexType name="harmon-mute">
<xs:annotation>
<xs:documentation>The harmon-mute type represents the symbols used for harmon mutes in brass notation.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="harmon-closed" type="harmon-closed"/>
</xs:sequence>
<xs:attributeGroup ref="print-style"/>
<xs:attributeGroup ref="placement"/>
</xs:complexType>

<xs:complexType name="harmonic">
<xs:annotation>
<xs:documentation>The harmonic type indicates natural and artificial harmonics. Allowing the type of pitch to be specified, combined with controls for appearance/playback differences, allows both the notation and the sound to be represented. Artificial harmonics can add a notated touching-pitch; artificial pinch harmonics will usually not notate a touching pitch. The attributes for the harmonic element refer to the use of the circular harmonic symbol, typically but not always used with natural harmonics.</xs:documentation>
Expand Down Expand Up @@ -5054,6 +5118,32 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is
<xs:element name="hole" type="hole"/>
<xs:element name="arrow" type="arrow"/>
<xs:element name="handbell" type="handbell"/>
<xs:element name="brass-bend" type="empty-placement">
<xs:annotation>
<xs:documentation>The brass-bend element represents the u-shaped bend symbol used in brass notation, distinct from the bend element used in guitar music.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="flip" type="empty-placement">
<xs:annotation>
<xs:documentation>The flip element represents the flip symbol used in brass notation.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="smear" type="empty-placement">
<xs:annotation>
<xs:documentation>The smear element represents the tilde-shaped smear symbol used in brass notation.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="open" type="empty-placement-smufl">
<xs:annotation>
<xs:documentation>The open element represents the open symbol, which looks like a circle. The smufl attribute can be used to distinguish different SMuFL glyphs that have a similar appearance such as brassMuteOpen and guitarOpenPedal. If not present, the default glyph is brassMuteOpen.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="half-muted" type="empty-placement-smufl">
<xs:annotation>
<xs:documentation>The half-muted element represents the half-muted symbol, which looks like a circle with a plus sign inside. The smufl attribute can be used to distinguish different SMuFL glyphs that have a similar appearance such as brassMuteHalfClosed and guitarHalfOpenPedal. If not present, the default glyph is brassMuteHalfClosed.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="harmon-mute" type="harmon-mute"/>
<xs:element name="other-technical" type="other-placement-text">
<xs:annotation>
<xs:documentation>The other-technical element is used to define any technical indications not yet in the MusicXML format. The smufl attribute can be used to specify a particular glyph, allowing application interoperability without requiring every SMuFL technical indication to have a MusicXML element equivalent. Using the other-technical element without the smufl attribute allows for extended representation, though without application interoperability.</xs:documentation>
Expand Down
85 changes: 84 additions & 1 deletion schema/note.mod
Expand Up @@ -804,7 +804,8 @@
triple-tongue | stopped | snap-pizzicato | fret |
string | hammer-on | pull-off | bend | tap | heel |
toe | fingernails | hole | arrow | handbell |
other-technical)*)>
brass-bend | flip | smear | open | half-muted |
harmon-mute | other-technical)*)>
<!ATTLIST technical
%optional-unique-id;
>
Expand Down Expand Up @@ -1112,6 +1113,84 @@
%placement;
>

<!--
The brass-bend element represents the u-shaped bend symbol
used in brass notation, distinct from the bend element used
in guitar music.
-->
<!ELEMENT brass-bend EMPTY>
<!ATTLIST brass-bend
%print-style;
%placement;
>

<!--
The flip element represents the flip symbol used in
brass notation.
-->
<!ELEMENT flip EMPTY>
<!ATTLIST flip
%print-style;
%placement;
>

<!--
The smear element represents the tilde-shaped smear symbol
used in brass notation.
-->
<!ELEMENT smear EMPTY>
<!ATTLIST smear
%print-style;
%placement;
>

<!--
The open element represents the open symbol, which
looks like a circle. The smufl attribute can be used to
distinguish different SMuFL glyphs that have a similar
appearance such as brassMuteOpen and guitarOpenPedal.
If not present, the default glyph is brassMuteOpen.
-->
<!ELEMENT open EMPTY>
<!ATTLIST open
%print-style;
%placement;
%smufl;
>

<!--
The half-muted element represents the half-muted symbol,
which looks like a circle with a plus sign inside. The
smufl attribute can be used to distinguish different
SMuFL glyphs that have a similar appearance such as
brassMuteHalfClosed and guitarHalfOpenPedal. If not
present, the default glyph is brassMuteHalfClosed.
-->
<!ELEMENT half-muted EMPTY>
<!ATTLIST half-muted
%print-style;
%placement;
%smufl;
>

<!--
The harmon-mute element represents the symbols used for
harmon mutes in brass notation. The harmon-closed element
represents whether the mute is closed, open, or half-open.
Valid element values are yes, no, and half. The optional
location attribute indicates which portion of the symbol
is filled in when the element value is half.
-->
<!ELEMENT harmon-mute (harmon-closed)>
<!ATTLIST harmon-mute
%print-style;
%placement;
>
<!ELEMENT harmon-closed (#PCDATA)>
<!ATTLIST harmon-closed
location (right | bottom | left | top) #IMPLIED
>

<!--
The other-technical element is used to define any technical
indications not yet in the MusicXML format. The smufl attribute
Expand Down Expand Up @@ -1206,6 +1285,7 @@
<!ATTLIST scoop
%line-shape;
%line-type;
%line-length;
%dashed-formatting;
%print-style;
%placement;
Expand All @@ -1214,6 +1294,7 @@
<!ATTLIST plop
%line-shape;
%line-type;
%line-length;
%dashed-formatting;
%print-style;
%placement;
Expand All @@ -1222,6 +1303,7 @@
<!ATTLIST doit
%line-shape;
%line-type;
%line-length;
%dashed-formatting;
%print-style;
%placement;
Expand All @@ -1230,6 +1312,7 @@
<!ATTLIST falloff
%line-shape;
%line-type;
%line-length;
%dashed-formatting;
%print-style;
%placement;
Expand Down
14 changes: 11 additions & 3 deletions schema/to30.xsl
Expand Up @@ -62,8 +62,9 @@

<!-- Remove new MusicXML 3.1 elements -->
<xsl:template
match="arrowhead | haydn |
inverted-vertical-turn | soft-accent"/>
match="arrowhead | brass-bend | flip | half-muted |
harmon-mute | haydn | inverted-vertical-turn |
open | smear | soft-accent"/>

<!-- Remove new id attributes -->
<xsl:template
Expand Down Expand Up @@ -118,10 +119,17 @@
<xsl:template
match="lyrics/@time-only"/>

<!--
Remove line-length attribute from articulation elements.
-->
<xsl:template
match="doit/@line-length | falloff/@line-length |
plop/@line-length | scoop/@line-length"/>

<!-- Remove smufl attributes -->
<xsl:template
match="accidental/@smufl | accidental-mark/@smufl |
arrow/@smufl | elision/@smful |
arrow/@smufl | elision/@smufl |
notehead/@smufl | stopped/@smufl |
other-articulation/@smufl | other-notation/@smufl |
other-ornament/@smufl | other-technical/@smufl"/>
Expand Down

0 comments on commit 7e4051e

Please sign in to comment.