Skip to content

Commit

Permalink
Fix #294: Add listen, listening, and player elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Good committed Feb 3, 2021
1 parent ca0ad4b commit 41c65b6
Show file tree
Hide file tree
Showing 6 changed files with 293 additions and 34 deletions.
53 changes: 27 additions & 26 deletions schema/common.mod
Original file line number Diff line number Diff line change
Expand Up @@ -688,11 +688,12 @@
last-beat CDATA #IMPLIED">

<!--
The time-only entity is used to indicate that a particular
playback-related element only applies particular times through
a repeated section. The value is a comma-separated list of
positive integers arranged in ascending order, indicating which
times through the repeated section that the element applies.
The time-only entity is used to indicate that a specific
playback- or listening-related element only applies specific
times through a repeated section. The value is a comma-
separated list of positive integers arranged in ascending
order, indicating which times through the repeated section
that the element applies.
-->
<!ENTITY % time-only
"time-only CDATA #IMPLIED">
Expand Down Expand Up @@ -1131,10 +1132,10 @@

<!--
For unpitched instruments, specify a MIDI 1.0 note number
ranging from 1 to 128. It is usually used with MIDI banks for
percussion. Note that MIDI 1.0 note numbers are generally
specified from 0 to 127 rather than the 1 to 128 numbering
used in this element.
ranging from 1 to 128. It is usually used with MIDI banks
for percussion. Note that MIDI 1.0 note numbers are
generally specified from 0 to 127 rather than the 1 to 128
numbering used in this element.
-->
<!ELEMENT midi-unpitched (#PCDATA)>

Expand All @@ -1160,12 +1161,12 @@

<!--
The play element, new in Version 3.0, specifies playback
techniques to be used in conjunction with the instrument-sound
element. When used as part of a sound element, it applies to
all notes going forward in score order. In multi-instrument
parts, the affected instrument should be specified using the
id attribute. When used as part of a note element, it applies
to the current note only.
techniques to be used in conjunction with the
instrument-sound element. When used as part of a sound
element, it applies to all notes going forward in score
order. In multi-instrument parts, the affected instrument
should be specified using the id attribute. When used as
part of a note element, it applies to the current note only.
-->
<!ELEMENT play ((ipa | mute | semi-pitched | other-play)*)>
<!ATTLIST play
Expand All @@ -1180,26 +1181,26 @@
<!ELEMENT ipa (#PCDATA)>

<!--
The mute element represents muting for different instruments,
including brass, winds, and strings. The on and off values
are used for undifferentiated mutes. The remaining values
represent specific mutes: straight, cup, harmon-no-stem,
harmon-stem, bucket, plunger, hat, solotone, practice,
stop-mute, stop-hand, echo, and palm.
The mute element represents muting for different
instruments, including brass, winds, and strings. The on
and off values are used for undifferentiated mutes. The
remaining values represent specific mutes: straight, cup,
harmon-no-stem, harmon-stem, bucket, plunger, hat, solotone,
practice, stop-mute, stop-hand, echo, and palm.
-->
<!ELEMENT mute (#PCDATA)>

<!--
The semi-pitched element represents categories of indefinite
pitch for percussion instruments. Values are high, medium-high,
medium, medium-low, low, and very-low.
pitch for percussion instruments. Values are high,
medium-high, medium, medium-low, low, and very-low.
-->
<!ELEMENT semi-pitched (#PCDATA)>

<!--
The other-play element represents other types of playback. The
required type attribute indicates the type of playback to which
the element content applies.
The other-play element represents other types of playback.
The required type attribute indicates the type of playback
to which the element content applies.
-->
<!ELEMENT other-play (#PCDATA)>
<!ATTLIST other-play
Expand Down
70 changes: 69 additions & 1 deletion schema/direction.mod
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
the previous element by default.
-->
<!ELEMENT direction (direction-type+, offset?,
%editorial-voice;, staff?, sound?)>
%editorial-voice;, staff?, sound?, listening?)>
<!ATTLIST direction
%placement;
%directive;
Expand Down Expand Up @@ -1284,3 +1284,71 @@
<!ELEMENT second (#PCDATA)>
<!ELEMENT swing-type (#PCDATA)>
<!ELEMENT swing-style (#PCDATA)>

<!--
The listen and listening elements, new in Version 4.0,
specify different ways that a score following or machine
listening application can interact with a performer. The
listening element handles interactions that change the state
of the listening application from the specified point in
the performance onward. If multiple child elements of the
same type are present, they should have distinct player
and/or time-only attributes.
The offset element is used to indicate that the listening
change takes place offset from the current score position.
If the listening element is a child of a direction element,
the listening offset element overrides the direction offset
element if both elements are present. Note that the offset
reflects the intended musical position for the change in
state. It should not be used to compensate for latency
issues in particular hardware configurations.
-->
<!ELEMENT listening ((sync | other-listening)+), offset?>

<!--
The sync element specifies the style that a score following
application should use to synchronize an accompaniment with
a performer. The none type indicates no synchronization to
the performer. The tempo type indicates synchronization
based on the performer tempo rather than individual events
in the score. The event type indicates synchronization by
following the performance of individual events in the score
rather than the performer tempo. The mostly-tempo and
mostly-event types combine these two approaches, with
mostly-tempo giving more weight to tempo and mostly-event
giving more weight to performed events. The always-event
type provides the strictest synchronization by not being
forgiving of missing performed events. If this element is
not included in a score, default synchronization depends
on the application.
The optional latency attribute specifies a time in
milliseconds that the listening application should expect
from the performer. The optional player and time-only
attributes restrict the element to apply to a single player
or set of times through a repeated section, respectively.
-->
<!ELEMENT sync EMPTY>
<!ATTLIST sync
type (none | tempo | mostly-tempo |
mostly-event | event | always-event) #REQUIRED
latency CDATA #IMPLIED
player IDREF #IMPLIED
%time-only;
>

<!--
The other-listening element represents other types of
listening control and interaction. The required type
attribute indicates the type of listening to which the
element content applies. The optional player and time-only
attributes restrict the element to apply to a single player
or set of times through a repeated section, respectively.
-->
<!ELEMENT other-listening (#PCDATA)>
<!ATTLIST other-listening
type CDATA #REQUIRED
player IDREF #IMPLIED
%time-only;
>
Loading

0 comments on commit 41c65b6

Please sign in to comment.