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
-
In this order (One or more times)
- Exactly one of the following
- <kind> (Required)
- <inversion> (Optional)
- <bass> (Optional)
- <degree> (Zero or more times)
- <frame> (Optional)
- <offset> (Optional)
-
In this order
- <footnote> (Optional)
- <level> (Optional)
- <staff> (Optional)
Attributes
Name | Type | Required? | Description |
---|---|---|---|
arrangement | harmony-arrangement | No | 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. |
color | color | No | Indicates the color of an element. |
default-x | tenths | No | Changes the computation of the default horizontal position. The origin is changed relative to the start of the entire current measure, at either the left barline or the start of the system. 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-y | tenths | No | 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-family | font-family | No | A comma-separated list of font names. |
font-size | font-size | No | One of the CSS sizes or a numeric point size. |
font-style | font-style | No | Normal or italic style. |
font-weight | font-weight | No | Normal or bold weight. |
id | ID | No | Specifies an ID that is unique to the entire document. |
placement | above-below | No | Indicates whether something is above or below another element, such as a note or a notation. |
print-frame | yes-no | No | Specifies the printing of a frame or fretboard diagram. |
print-object | yes-no | No | Specifies whether or not to print an object. It is yes if not specified. |
relative-x | tenths | No | 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-y | tenths | No | 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. |
system | system-relation | No | Distinguishes elements that are associated with a system rather than the particular part where the element appears. |
type | harmony-type | No | 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: