8. Lyrics

Text underlays for lyrics are represented by lyric elements attached to notes:

lyric     ::=  (lyric [lyricId] lyricText [style] [placement] printOptions* )
lyricId   ::=  num.  Default 1
lyricText ::=  string+ [hyphen][melisma]
hyphen    ::=  "-"
melisma   ::=  (melisma)

The minimun content is just one syllable for the note:

(score (vers 2.0)(instrument (musicData
    (clef G)
    (n c4 q (lyric "do"))
    (n d4 q (lyric "re"))
    (n e4 q (lyric "mi"))
    (n f4 q (lyric "fa"))
    (n g4 q (lyric "sol"))
    (n a4 q (lyric "la"))
    (n b4 q (lyric "si"))
    (n c5 q (lyric "do"))
    (barline)
)))
_images/lyric-01.png

The lyricId element is used when there are multiple lyric lines, for identifying the line. If not specified, line 1 is assumed:

(score (vers 2.0)(instrument (musicData
    (clef G)
    (n c4 q (lyric 1 "This")(lyric 2 "A"))
    (n d4 q (lyric 1 "is")(lyric 2 "se" -))
    (n e4 q (lyric 1 "line")(lyric 2 "cond"))
    (n f4 q (lyric 1 "one.")(lyric 2 "line."))
    (barline)
)))
_images/lyric-02.png

The hyphen element (a character ‘-‘ after the syllable text) indicates that this syllable is an intermediate one (a word-beginning syllable or a mid-word syllable) and thus a hyphenation symbol must be displayed between this and next syllable:

(score (vers 2.0)(instrument (musicData
    (clef G)
    (n c4 q (lyric "hy" -))
    (n d4 q (lyric "phe" -))
    (n e4 q (lyric "na" -))
    (n f4 q (lyric "ted"))
    (n g4 q (lyric "words"))
    (n a4 q (lyric "and"))
    (n b4 q (lyric "more"))
    (n c5 q (lyric "words"))
    (barline)
)))
_images/lyric-03.png

The melisma element represent melisma lines:

(score (vers 2.0)(instrument (musicData
    (clef G)
    (n c4 q (lyric "A" (melisma)))
    (n d4 q)
    (n e4 q)
    (n f4 q)
    (n g4 q (lyric "men"))
    (barline)
)))
_images/lyric-04.png

Multiple syllables on a note are automatically separated by elision symbols (i.e. an undertie). Therefore, an additional character for the elision symbol must not be added to the syllable text:

(score (vers 2.0)(instrument (musicData
    (clef G)
    (n g5 e g+ (lyric "con" -))
    (n c5 e (lyric "sa" (melisma)))
    (n b4 e g-)
    (barline)
    (n c5 e g+)
    (n b4 e (lyric "cro" "a"))
    (n a4 e g- (lyric "te"))
    (barline)
)))
_images/lyric-05.png

The placement element is used to determine if the lyrics should be placed above the staff or below the staff. The specified value will be applied to the lyric element in wich it is defined and to all following lyric elements in the same line until a new placement is defined. By default, when no placement is defined, lyrics will be placed below:

(score (vers 2.0)(instrument (musicData
    (clef G)
    (n c6 q (lyric "A" - above))
    (n e6 q (lyric "bove"))
    (n a3 q (lyric "Be" - below))
    (n f3 q (lyric "low"))
    (barline)
)))
_images/lyric-06.png

Style can be assigned to each lyric line by using the style element. It will be applied to the lyric element in wich it is defined and to all following lyric elements in the same line until a new style is defined. By default, when no style is defined, style “Default lyrics” is applied.