The <lyric> element
Parent element: <note>
The <lyric> element represents text underlays for lyrics. Two <text> elements that are not separated by an <elision> element are part of the same syllable, but may have different text formatting. A second <syllabic> element is not allowed unless preceded by an <elision> element.
If not otherwise specified:
- The justify value is center.
- The placement value is below.
- The valign value is baseline.
- The halign value matches the justify value.
Content
In this order
-
Exactly one of the following
-
In this order
- <syllabic> (Optional)
- <text> (Required)
-
In this order (Zero or more times)
-
In this order (Optional)
- <elision> (Required)
- <syllabic> (Optional)
- <text> (Required)
-
In this order (Optional)
- <extend> (Optional)
- <extend>
- <laughing>
- <humming>
-
In this order
- <end-line> (Optional)
- <end-paragraph> (Optional)
-
In this order
- <footnote> (Optional)
- <level> (Optional)
Attributes
Name | Type | Required? | Description |
---|---|---|---|
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 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-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. |
id | ID | No | Specifies an ID that is unique to the entire document. |
justify | left-center-right | No | Indicates left, center, or right justification. The default value varies for different elements. For elements where the justify attribute is present but the halign attribute is not, the justify attribute indicates horizontal alignment as well as justification. |
name | token | No | Indicates the name of the lyric type. Common examples are verse and chorus. |
number | NMTOKEN | No | Specifies the lyric line when multiple lines are present. |
placement | above-below | No | Indicates whether something is above or below another element, such as a note or a notation. |
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. |
time-only | time-only | No | Specifies which lyrics are to be sung which times through a repeated section. |
Examples
This element is used in the following examples: