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

Element: harmony [group music-data]


The harmony type is based on Humdrum's **harm encoding, extended to support chord symbols in popular music as well as functional harmony analysis in classical music.
If there are alternate harmonies possible, this can be specified using multiple harmony elements differentiated by type. Explicit harmonies have all notes present in the music; implied have some notes missing but implied; alternate represents alternate analyses.
The harmony object may be used for analysis or for chord symbols. The print-object attribute controls whether or not anything is printed due to the harmony element. The print-frame attribute controls printing of a frame or fretboard diagram. The print-style attribute group sets the default for the harmony, but individual elements can override this with their own print-style values.

Derived By

Type harmony

Name  Type  Required?  Default  Description 
type  harmony-type  No 
print-object  yes-no  No 
print-frame  yes-no  No  The print-frame attribute controls printing of a frame or fretboard diagram.
default-x  tenths  No 
default-y  tenths  No 
relative-x  tenths  No 
relative-y  tenths  No 
font-family  comma-separated-text  No 
font-style  font-style  No 
font-size  font-size  No 
font-weight  font-weight  No 
color  color  No 
placement  above-below  No 
Content Model

Contains elements as defined in the following table.

Component  Type  Occurs  Default  Description 
function  style-text  1..1 

The function element is used to represent classical functional harmony with an indication like I, II, III rather than C, D, E. It is relative to the key that is specified in the MusicXML encoding.

root  root  1..1 

The root type indicates a pitch like C, D, E vs. a function indication like I, II, III. It is used with chord symbols in popular music. The root element has a root-step and optional root-alter element similar to the step and alter elements, but renamed to distinguish the different musical meanings.

kind  kind  1..1 

Kind indicates the type of chord. Degree elements can then add, subtract, or alter from these starting points.
The attributes are used to indicate the formatting of the symbol. Since the kind element is the constant in all the harmony-chord groups that can make up a polychord, many formatting attributes are here.
The use-symbols attribute is yes if the kind should be represented when possible with harmony symbols rather than letters and numbers. These symbols include:
major: a triangle, like Unicode 25B3
minor: -, like Unicode 002D
augmented: +, like Unicode 002B
diminished: °, like Unicode 00B0
half-diminished: ø, like Unicode 00F8
For the major-minor kind, only the minor symbol is used when use-symbols is yes. The major symbol is set using the symbol attribute in the degree-value element. The corresponding degree-alter value will usually be 0 in this case.

inversion  inversion  0..1 

The inversion type represents harmony inversions. The value is a number indicating which inversion is used: 0 for root position, 1 for first inversion, etc.

bass  bass  0..1 

The bass type is used to indicate a bass note in popular music chord symbols, e.g. G/C. It is generally not used in functional harmony, as inversion is generally not used in pop chord symbols. As with root, it is divided into step and alter elements, similar to pitches.

degree  degree  0..* 

The degree type is used to add, alter, or subtract individual notes in the chord. The print-object attribute can be used to keep the degree from printing separately when it has already taken into account in the text attribute of the kind element. The degree-value and degree-type text attributes specify how the value and type of the degree should be displayed.
A harmony of kind "other" can be spelled explicitly by using a series of degree elements together with a root.

frame  frame  0..1 

The frame type represents a frame or fretboard diagram used together with a chord symbol. The representation is based on the NIFF guitar grid with additional information.

offset  offset  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.
level  level  1..1  The level type is used to specify editorial information for different MusicXML elements.
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.

Referenced By

      <harmony default-y="40">
        <kind halign="center" use-symbols="yes">major-seventh</kind>


MusicXML Documentation Home
Last built 2/20/2015

7007 Winchester Circle, Suite 140

Boulder, CO 80301