![]() |
GNU LilyPond-- -- |
||||||||||
|
Printing lyricsIn this section we shall explain how to typeset the following fragment of The Free Software Song: To print lyrics, you must enter them and then instruct lilypond to
print the lyrics.
You can enter lyrics in a special input mode of LilyPond. This mode is
called Lyrics mode, and it is introduced by the keyword Syllables are entered like notes, but with pitches replaced by text. For
example, Spaces can be introduced into a lyric either by using quotes:
These are the lyrics for the free software song: \lyrics { Join us now __ and share the soft -- ware; } As you can see, extender lines are entered as You can use ordinary hyphens at the end of a syllable, i.e. soft- warebut then the hyphen will be attached to the end of the first syllable. If you want them centered between syllables you can use the special
` Normally the notes that you enter are transformed into note heads. Note heads alone make no sense, so they need surrounding information: a key signature, a clef, staff lines, etc. They need context. In LilyPond, these symbols are created by objects called `interpretation contexts'. Interpretation contexts exist for generating notation (`notation context') and for generating sound (`performance context'). These objects only exist while LilyPond is executing. When LilyPond interprets music, it will create a Staff context. We don't want that default here, because we want lyric. The command \context Lyricsexplicitly creates an interpretation context of Lyrics type to interpret the song text that we entered.
The melody of the song doesn't offer anything new: \notes \relative c' { \time 7/4 d'2 c4 b16-( a g a b a b c-) a2 b2 c4 b8-( a16 g a4-) g2 } Both can be combined with the \addlyrics \notes \relative c' ... \context Lyrics \lyrics ... The lyrics are also music expressions, similar to notes. Each syllable of the lyrics is put under a note of the melody. The complete file is listed here: \score { \notes { \addlyrics \notes \relative c' { \time 7/4 d'2 c4 b16 ( a g a b a b ) c a2 b2 c4 b8 ( a16 g ) a4 g2 } \context Lyrics \lyrics { Join us now __ and share the soft -- ware; } } \paper { linewidth = -1. } } |
||||||||||
Go back to index of LilyPond.
Please send GNU LilyPond questions and comments to lilypond-user@gnu.org. Please send comments on these web pages to (address unknown) Copyright (c) 1997--2002 Han-Wen Nienhuys and Jan Nieuwenhuizen. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. |
This page was built from LilyPond-1.7.14 (development-branch) by