[icon]

GNU LilyPond

-- --

What is LilyPond
Home
Examples
Templates
Download
GNU/Linux binaries
Windows binaries
Source code
Documentation
Tutorial
Manual
Glossary
Index

Support
Mailing lists
Search
WikiWiki

External sites
lilypond.org/stable
lilypond.org/development
savannah.gnu.org
ftp.lilypond.org
Mutopia
Other music online

Printing lyrics

In this section we shall explain how to typeset the following fragment of The Free Software Song:

[picture of music]

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 \lyrics. The purpose of this mode is that you can enter lyrics as plain text, punctuation, and accents without any hassle.

Syllables are entered like notes, but with pitches replaced by text. For example, Twin- kle twin- kle enters four syllables. Note that the hyphen has no special meaning for lyrics, and does not introduce special symbols.

Spaces can be introduced into a lyric either by using quotes: "He could" not or by using an underscore without quotes: He_could not. All unquoted underscores are converted to spaces.

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 __. This will create an extender, which is a line that extends over the entire duration of the lyric. This line will run all the way to the start of the next lyric, so you may want to shorten it by using a blank lyric (using _).

You can use ordinary hyphens at the end of a syllable, i.e.

             soft- ware
     
but 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 `--' lyric as a separate word between syllables. The hyphen will have variable length depending on the space between the syllables and it will be centered between the syllables.

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 Lyrics
     
explicitly 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:

     \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

Buchan Milne <(address unknown)>, Thu Mar 6 21:11:35 2003 CET.