Here is a three-bar example of a simple lead sheet. It contains the melody together with chord symbols and diagrams for how to play the chords on a guitar:
The first chord is a G major sixth chord with the fifth (D) in the bass. The second chord is notated as an A major chord with an added ninth degree. Another analysis might be to call it a dominant ninth chord with a missing seventh degree. MusicXML supports both types of analysis. For this example, we follow the written chord diagram notation. The third chord, an A11, will be discussed in the chord diagram section, as it includes both fingerings and a barre symbol.
Here is how the first G6 chord symbol is represented in the MusicXML file, omitting the chord diagram for the time being:
<harmony default-y="100"> <root> <root-step>G</root-step> </root> <kind halign="center" text="6">major-sixth</kind> <bass> <bass-step>D</bass-step> </bass> </harmony>
Each chord symbol has at least two elements: a <root> element to indicate the root of the chord, and a kind element to indicate the type of the chord. Here, we have a root of G and a kind of major-sixth. MusicXML 3.0 supports 33 different kind elements, listed in the direction.mod file. The kind element has a text attribute that indicates that the chord is displayed as G6, not as Gmaj6, GM6, or other spelling that could represent the same chord. This symbol also indicates the bass of the chord, represented using the bass element. Both the root and the bass element divide the pitch into step and alter elements, similar to how the pitch element works. The root element uses the root-step and root-alter elements, while the bass element uses the bass-step and bass-alter elements. There is no element that corresponds to the octave element for pitch, since this information is not considered part of the harmonic analysis or the chord symbol. MusicXML can represent all sorts of alterations to the built-in 33 kinds of chords. Degrees in the chord can be added, subtracted (e.g. "no 3"), or altered (e.g. "#5"). Here is how the second A(9) chord symbol is presented in MusicXML, using an added degree:
<harmony default-y="100"> <root> <root-step>A</root-step> </root> <kind halign="center" parentheses-degrees="yes">major</kind> <degree> <degree-value>9</degree-value> <degree-alter>0</degree-alter> <degree-type text="">add</degree-type> </degree> </harmony>
The degree element shows that we are adding an unaltered 9th degree to the chord, notating it with just the degree value (not as "add 9") and with the added degrees in parentheses. The value of the degree-type element can be add, alter, or subtract. If the degree-type value is alter or subtract, the degree-alter value is relative to the degree already in the chord based on its kind element. If the degree-type value is add, the degree-alter value is relative to a dominant chord.
MusicXML’s harmony element contains additional features to support formatting and harmonic analysis. Full details are available in the direction.mod file.