MusicXML 4.1 Draft
< >elements
@attributes
MusicXML 4.1 Draft>Elements>The <harmony> element

The <harmony> element

Parent elements: <measure> (partwise)<part> (timewise)

The <harmony> element represents harmony analysis, including chord symbols in popular music as well as functional harmony analysis in classical music.

The print-object attribute controls whether or not anything is printed due to the <harmony> element. The print suggestion attributes set the defaults for the harmony, but individual elements can override this with their own values.

A <harmony> element can contain many stacked chords (e.g. V of II). Each individual chord including a required <kind> element is referred to as a harmony-chord. Stacked chords or secondary functions are represented using a sequence of harmony-chords. For example, V of II would be represented by a harmony-chord with a 5 numeral followed by a harmony-chord with a 2 numeral.

A <root> is a pitch name like C, D, E, while a <numeral> is a scale degree like 1, 2, 3. The <root> element is generally used with pop chord symbols, while the <numeral> element is generally used with classical functional harmony and Nashville numbers. It is an either/or choice to avoid data inconsistency. The <function> element, which represents Roman numerals with roman numeral text, has been deprecated as of MusicXML 4.0.

Content

In this order

Attributes

NameTypeRequired?(Default)Description
arrangementharmony-arrangementNoSpecifies how multiple harmony-chords are arranged relative to each other. Harmony-chords with vertical arrangement are separated by horizontal lines. Harmony-chords with diagonal or horizontal arrangement are separated by diagonal lines or slashes.
Specifies how multiple harmony-chords are arranged relative to each other. Harmony-chords with vertical arrangement are separated by horizontal lines. Harmony-chords with diagonal or horizontal arrangement are separated by diagonal lines or slashes.
colorcolorNoIndicates the color of an element.
Indicates the color of an element.
default-xtenthsNoChanges the computation of the default horizontal position. The origin is changed relative to the left-hand side of the note or the musical position within the bar. Positive x is right and negative x is left.

This attribute provides higher-resolution positioning data than the <offset> element. Applications reading a MusicXML file that can understand both features should generally rely on this attribute for its greater accuracy.

Changes the computation of the default horizontal position. The origin is changed relative to the left-hand side of the note or the musical position within the bar. Positive x is right and negative x is left.

This attribute provides higher-resolution positioning data than the <offset> element. Applications reading a MusicXML file that can understand both features should generally rely on this attribute for its greater accuracy.

default-ytenthsNoChanges the computation of the default vertical position. The origin is changed relative to the top line of the staff. Positive y is up and negative y is down.

This attribute provides higher-resolution positioning data than the placement attribute. Applications reading a MusicXML file that can understand both attributes should generally rely on this attribute for its greater accuracy.

Changes the computation of the default vertical position. The origin is changed relative to the top line of the staff. Positive y is up and negative y is down.

This attribute provides higher-resolution positioning data than the placement attribute. Applications reading a MusicXML file that can understand both attributes should generally rely on this attribute for its greater accuracy.

font-familyfont-familyNoA comma-separated list of font names.
A comma-separated list of font names.
font-sizefont-sizeNoOne of the CSS sizes or a numeric point size.
One of the CSS sizes or a numeric point size.
font-stylefont-styleNoNormal or italic style.
Normal or italic style.
font-weightfont-weightNoNormal or bold weight.
Normal or bold weight.
idxs:IDNoSpecifies an ID that is unique to the entire document.
Specifies an ID that is unique to the entire document.
placementabove-belowNoIndicates whether something is above or below another element, such as a note or a notation.
Indicates whether something is above or below another element, such as a note or a notation.
print-frameyes-noNoSpecifies the printing of a frame or fretboard diagram.
Specifies the printing of a frame or fretboard diagram.
print-objectyes-noNoSpecifies whether or not to print an object. It is yes if not specified.
Specifies whether or not to print an object. It is yes if not specified.
relative-xtenthsNoChanges the horizontal position relative to the default position, either as computed by the individual program, or as overridden by the default-x attribute. Positive x is right and negative x is left. It should be interpreted in the context of the <offset> element or directive attribute if those are present.
Changes the horizontal position relative to the default position, either as computed by the individual program, or as overridden by the default-x attribute. Positive x is right and negative x is left. It should be interpreted in the context of the <offset> element or directive attribute if those are present.
relative-ytenthsNoChanges the vertical position relative to the default position, either as computed by the individual program, or as overridden by the default-y attribute. Positive y is up and negative y is down. It should be interpreted in the context of the placement attribute if that is present.
Changes the vertical position relative to the default position, either as computed by the individual program, or as overridden by the default-y attribute. Positive y is up and negative y is down. It should be interpreted in the context of the placement attribute if that is present.
systemsystem-relationNoDistinguishes elements that are associated with a system rather than the particular part where the element appears.
Distinguishes elements that are associated with a system rather than the particular part where the element appears.
typeharmony-typeNoIf there are alternate harmonies possible, this can be specified using multiple <harmony> elements differentiated by type. Explicit harmonies have all note present in the music; implied have some notes missing but implied; alternate represents alternate analyses.
If there are alternate harmonies possible, this can be specified using multiple <harmony> elements differentiated by type. Explicit harmonies have all note present in the music; implied have some notes missing but implied; alternate represents alternate analyses.

Examples

This element is used in the following examples:

<bass-alter><bass-separator><bass-step><degree-type><degree-value><fingering> (Frame)<fret> (Frame)<inversion><kind><numeral-alter><numeral-key><numeral-root><root-alter><root-step>Tutorial: Chord Symbols