Given the duration of a note and the divisions attribute, a program can usually infer the symbolic note type (e.g. quarter note, dotted-eighth note). However, it is much easier for notation programs if this is represented explicitly, rather than making the program infer the correct symbolic value. In some cases, the intended note duration does not match what is written, be it some of Bach’s dotted notations, notes inégales, or jazz swing rhythms.
The type element is used to indicate the symbolic note type, such as quarter, eighth, or 16th. MusicXML symbolic note types range from 256th notes to long notes: 256th, 128th, 64th, 32nd, 16th, eighth, quarter, half, whole, breve, and long. The type element may be followed by one or more empty dot elements to indicate dotted notes.
The time-modification element is used to make it easier for applications to handle tuplets properly. For a normal triplet, this would look like:
<time-modification> <actual-notes>3</actual-notes> <normal-notes>2</normal-notes> </time-modification>
This indicates that three notes are placed in the time usually allotted for two notes. There is an optional normal-type element that is used when the type of the note does not match the type of the normal-notes in the triplet. Say you have an eighth note triplet, but instead of three eighth notes, you have a quarter note and eighth note instead. Without a normal-type element, software that reads the quarter note in the tuplet will likely assume that this is starting a quarter-note triplet, not an eighth note triplet. In this case, the symbolic type and tuplet would be encoded as:
<type>quarter</type> <time-modification> <actual-notes>3</actual-notes> <normal-notes>2</normal-notes> <normal-type>eighth</normal-type> </time-modification>
The time-modification element cannot represent all aspects of tuplets, such as detailed formatting and where nested tuplets begin and end. It is recommended that the tuplet element also be used to notate where tuplets begin and end, along with any additional formatting details that may be needed. The tuplet element is a child of the notations element described below.
Stem direction is represented with the stem element, whose value can be up, down, none, or double. For up and down stems, the default-y attribute represents where the stem ends, measured in tenths of interline space from the top line of the staff.
Beams are represented by beam elements. Their value can be begin, continue, end, forward hook, and backward hook. Each element has a beam-level attribute which ranges from 1 to 6 for eighth-note to 256th-note beams.
The accidental element represents actual notated accidentals. Values can be sharp, flat, natural, double-sharp, sharp-sharp, flat-flat, natural-sharp, natural-flat, quarter-flat, quarter-sharp, three-quarters-flat, and three-quarters-sharp. An accidental element has optional courtesy and editorial attributes to indicate courtesy and editorial accidentals. The bracket, parentheses, and size attributes offer more precise visual representations for these types of accidentals.
Many additional elements can be associated with a note. In MusicXML, these are collected under the notations object. Tied notes, slurs, tuplets, fermatas, and arpeggios are represented by top-level children of the notations element. Dynamics, ornaments, articulations, and technical indications specific to particular instruments are also top-level children of the notations element. A staccato mark would then be placed within the articulations element. The tied element represents the visual part of a tie, and the tuplet element represents the visual part of a tuplet. The tie element affects the sound, and the time-modification affects placement, but the tied and tuplet elements indicate that there is something to see on the score indicating the tie or tuplet. (With ties, the two nearly always go together, but with tuplets this is not the case.) The second E-flat in measure 3 of the voice part, which is the end of a tie and start of a tuplet, is represented as:
<note default-x="92"> <pitch> <step>E</step> <alter>-1</alter> <octave>5</octave> </pitch> <duration>8</duration> <tie type="stop"/> <voice>1</voice> <type>eighth</type> <time-modification> <actual-notes>3</actual-notes> <normal-notes>2</normal-notes> </time-modification> <stem default-y="-40">down</stem> <beam number="1">begin</beam> <notations> <tied type="stop"/> <tuplet bracket="no" number="1" placement="above" type="start"/> </notations> </note>
Slur, tied, and tuplet elements all have a number attribute to distinguish overlapping graphical elements.
Full details for all the different notations can be found in their definitions in the note.mod file.