You are here: MusicXML Reference > Score Schema (XSD) > Elements > Element: direction

Element: direction [group music-data]

Description

A direction is a musical indication that is not attached to a specific note. Two or more may be combined to indicate starts and stops of wedges, dashes, etc.
By default, a series of direction-type elements and a series of child elements of a direction-type within a single direction element follow one another in sequence visually. For a series of direction-type children, non-positional formatting attributes are carried over from the previous element by default.

Derived By

Type direction

Attributes
Name  Type  Required?  Default  Description 
placement  above-below  No 
directive  yes-no  No 
Content Model

Contains elements as defined in the following table.

Component  Type  Occurs  Default  Description 
  1..1 
direction-type  direction-type  1..*  Textual direction types may have more than 1 component due to multiple fonts. The dynamics element may also be used in the notations element. Attribute groups related to print suggestions apply to the individual direction-type, not to the overall direction.
offset  offset  0..1 

An offset is represented in terms of divisions, and indicates where the direction will appear relative to the current musical location. This affects the visual appearance of the direction. If an element within a direction includes a default-x attribute, the offset value will be ignored when determining the appearance of that element.

  0..1 
footnote  formatted-text  1..1  The footnote element specifies editorial information that appears in footnotes in the printed score. It is defined within a group due to its multiple uses within the MusicXML schema.
  0..1 
level  level  1..1  The level type is used to specify editorial information for different MusicXML elements.
  0..1 
voice  xs:string  1..1 

A voice is a sequence of musical events (e.g. notes, chords, rests) that proceeds linearly in time. The voice element is used to distinguish between multiple voices (what MuseData calls tracks) in individual parts. It is defined within a group due to its multiple uses within the MusicXML schema.

  0..1 
staff  xs:positiveInteger  1..1 

Staff assignment is only needed for music notated on multiple staves. Used by both notes and directions. Staff values are numbers, with 1 referring to the top-most staff in a part.

sound  sound  0..1  The sound element contains general playback parameters. They can stand alone within a part/measure, or be a component element within a direction. Tempo is expressed in quarter notes per minute. If 0, the sound-generating program should prompt the user at the time of compiling a sound (MIDI) file. Dynamics (or MIDI velocity) are expressed as a percentage of the default forte value (90 for MIDI 1.0). Dacapo indicates to go back to the beginning of the movement. When used it always has the value "yes". Segno and dalsegno are used for backwards jumps to a segno sign; coda and tocoda are used for forward jumps to a coda sign. If there are multiple jumps, the value of these parameters can be used to name and distinguish them. If segno or coda is used, the divisions attribute can also be used to indicate the number of divisions per quarter note. Otherwise sound and MIDI generating programs may have to recompute this. By default, a dalsegno or dacapo attribute indicates that the jump should occur the first time through, while a tocoda attribute indicates the jump should occur the second time through. The time that jumps occur can be changed by using the time-only attribute. Forward-repeat is used when a forward repeat sign is implied, and usually follows a bar line. When used it always has the value of "yes". The fine attribute follows the final note or rest in a movement with a da capo or dal segno direction. If numeric, the value represents the actual duration of the final note or rest, which can be ambiguous in written notation and different among parts and voices. The value may also be "yes" to indicate no change to the final duration. If the sound element applies only particular times through a repeat, the time-only attribute indicates which times to apply the sound element. Pizzicato in a sound element effects all following notes. Yes indicates pizzicato, no indicates arco. The pan and elevation attributes are deprecated in Version 2.0. The pan and elevation elements in the midi-instrument element should be used instead. The meaning of the pan and elevation attributes is the same as for the pan and elevation elements. If both are present, the mid-instrument elements take priority. The damper-pedal, soft-pedal, and sostenuto-pedal attributes effect playback of the three common piano pedals and their MIDI controller equivalents. The yes value indicates the pedal is depressed; no indicates the pedal is released. A numeric value from 0 to 100 may also be used for half pedaling. This value is the percentage that the pedal is depressed. A value of 0 is equivalent to no, and a value of 100 is equivalent to yes. MIDI devices, MIDI instruments, and playback techniques are changed using the midi-device, midi-instrument, and play elements. When there are multiple instances of these elements, they should be grouped together by instrument using the id attribute values. The offset element is used to indicate that the sound takes place offset from the current score position. If the sound element is a child of a direction element, the sound 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 sound. It should not be used to compensate for latency issues in particular hardware configurations.
Referenced By
Example

      <direction placement="above">
        <direction-type>
          <wedge default-y="38" spread="0" type="crescendo"/>
        </direction-type>
        <offset>-1</offset>
      </direction>

 

MusicXML Documentation Home
Last built 2/20/2015

7007 Winchester Circle, Suite 140

Boulder, CO 80301