Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 3a7b4dfc766af1222d90c7f03a0844e6 > files > 6424

lilypond-doc-2.11.57-1mdv2009.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- header_tag -->
<html lang="en">
<head>
<title>Voices and vocals - GNU LilyPond Learning Manual</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="GNU LilyPond Learning Manual">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Voices-contain-music.html#Voices-contain-music" title="Voices contain music">
<link rel="prev" href="Explicitly-instantiating-voices.html#Explicitly-instantiating-voices" title="Explicitly instantiating voices">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1999--2007 by the authors

     Permission is granted to copy, distribute and/or modify this
     document under the terms of the GNU Free Documentation License,
     Version 1.1 or any later version published by the Free Software
     Foundation; with no Invariant Sections.  A copy of the license is
     included in the section entitled ``GNU Free Documentation
     License''.
   -->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
hr { border:0; height:1; color: #000000; background-color: #000000; }
/* hr {
  border:  none;
  height: 1px;
  color: #666666;
  background-color: #666666;
}
body {
  border-left: 1px solid #666666;
  border-right: 1px solid #666666;
  color: #332d28;
  margin-right: auto;
  margin-left: auto;
  width: 60em;
  list-style-type: square;
  font-family: Arial,Helvetica,sans-serif;
  padding-right: 1em;
  padding-left: 1em;
}
a {
  border-bottom: 1px dashed #344242;
  text-decoration: none;
  color: #344242;
}
a:link {
  text-decoration: none;
}
a:visited {
  border-bottom: 1px dashed #666666;
  color: #666666;
}
a:active {
  border-bottom: 1px solid #00cccc;
  color: #00cccc;
}
a:hover {
  border-bottom: 1px solid #1d7b85;
  color: #1d7b85;
}
blockquote {
  border: 1px solid #cccccc;
  padding: 3px;
  width: 40em;
}
.node {
  border-left: 1px solid #666666;
  margin: -0.5em 0px 1em;
  padding: 2px 1px 0px;
  font-style: italic;
}
.node a {
  border:  none;
  text-decoration: underline;
  font-style: normal;
  font-weight: bold;
}
.verbatim {
  font-family: "Courier New",Courier,monospace;
}
.unnumberedsubsubsec {
  font-size: large;
  color: #1d7b85;
}
.subsubheading {
  font-size: large;
  color: #3b220d;
}
.contents {
  border: 1px dashed #339999;
  margin: 3px 2em;
  list-style-type: square;
  padding-right: 1em;
  width: 40em;
  background-color: #fcfff9;
}
.contents a {
  border-bottom: 1px dashed #423d34;
  text-decoration: none;
  color: #423d34;
}
.contents a:visited {
  border-bottom: 1px dashed #666666;
  color: #666666;
}
.contents a:active {
  border-bottom: 1px solid #f0d86d;
  color: #f0d86d;
}
.contents a:hover {
  border-bottom: 1px solid #3b220d;
  color: #3b220d;
}
.menu {
  border-left: 1px dashed #339999;
  margin: 3px 2em 1em;
  list-style-type: square;
  padding-left: 1.4em;
  width: 40em;
}
.unnumbered {
}
h2 {
  font-size: x-large;
  color: #1d7b85;
}
*/
--></style>
</head>
<BODY BGCOLOR=WHITE TEXT=BLACK>

<div class="node">
<p>
<a name="Voices-and-vocals"></a>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Explicitly-instantiating-voices.html#Explicitly-instantiating-voices">Explicitly instantiating voices</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Voices-contain-music.html#Voices-contain-music">Voices contain music</a>
<hr>
</div>

<h4 class="subsection">3.2.3 Voices and vocals</h4>

<p>Vocal music presents a special difficulty: we need to combine two
expressions &ndash; notes and lyrics.

   <p><a name="index-g_t_005cnew-Lyrics-263"></a><a name="index-g_t_005cnew-Lyrics-264"></a>
<a name="index-g_t_005clyricsto-265"></a><a name="index-g_t_005clyricsto-266"></a>
<a name="index-Lyrics-context_002c-creating-267"></a><a name="index-lyrics_002c-linking-to-voice-268"></a>
You have already seen the <code>\addlyrics{}</code> command, which
handles simple scores well.  However, this technique is
quite limited.  For more complex music, you must introduce the
lyrics in a <code>Lyrics</code> context using <code>\new Lyrics</code> and
explicitly link
the lyrics to the notes with <code>\lyricsto{}</code>, using the
name assigned to the Voice.

   <blockquote>
<pre class="verbatim">     
     &lt;&lt;
       \new Voice = "one" \relative c'' {
         \autoBeamOff
         \time 2/4
         c4 b8. a16 g4. f8 e4 d c2
       }
       \new Lyrics \lyricsto "one" {
         No more let sins and sor -- rows grow.
       }
     >>
</pre>
     <p>
 <a href="../7c/lily-bd3aa8a2.ly">
  <img align="middle"
    border="0" src="../7c/lily-bd3aa8a2.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>Note that the lyrics must be linked to a <code>Voice</code> context,
<em>not</em> a <code>Staff</code> context.  This is a case where it is
necessary to create <code>Staff</code> and <code>Voice</code> contexts
explicitly.

   <p><a name="index-lyrics-and-beaming-269"></a><a name="index-beaming-and-lyrics-270"></a><a name="index-g_t_005cautoBeamOff-271"></a><a name="index-g_t_005cautoBeamOff-272"></a>

   <p>The automatic beaming which LilyPond uses by default works well
for instrumental music, but not so well for music with lyrics,
where beaming is either not required at all or is used to indicate
melismata in the lyrics.  In the example above we use the command
<code>\autoBeamOff</code> to turn off the automatic beaming.

   <p><a name="index-g_t_005cnew-ChoirStaff-273"></a><a name="index-g_t_005cnew-ChoirStaff-274"></a>
<a name="index-g_t_005clyricmode-275"></a><a name="index-g_t_005clyricmode-276"></a>
<a name="index-vocal-score-structure-277"></a>
Let us reuse the earlier example from Judas Maccabæus to
illustrate this more flexible technique.  We first recast
it to use variables so the music and lyrics can be separated
from the staff structure.  We also introduce a ChoirStaff
bracket.  The lyrics themselves must be introduced with
<code>\lyricmode</code> to ensure they are interpreted as lyrics
rather than music.

   <blockquote>
<pre class="verbatim">     
     global = { \time 6/8 \partial 8 \key f \major}
     SopOneMusic = \relative c'' {
       c8 | c([ bes)] a a([ g)] f | f'4. b, | c4.~ c4 }
     SopTwoMusic = \relative c' {
       r8 | r4. r4 c8 | a'([ g)] f f([ e)] d | e([ d)] c bes' }
     SopOneLyrics = \lyricmode {
       Let | flee -- cy flocks the | hills a -- dorn, __ }
     SopTwoLyrics = \lyricmode {
       Let | flee -- cy flocks the | hills a -- dorn, }
     
     \score {
       \new ChoirStaff &lt;&lt;
         \new Staff &lt;&lt;
           \new Voice = "SopOne" {
             \global
             \SopOneMusic
           }
           \new Lyrics \lyricsto "SopOne" {
             \SopOneLyrics
           }
         >>
         \new Staff &lt;&lt;
           \new Voice = "SopTwo" {
             \global
             \SopTwoMusic
           }
           \new Lyrics \lyricsto "SopTwo" {
             \SopTwoLyrics
           }
         >>
       >>
     }
</pre>
     <p>
 <a href="../27/lily-53af5fae.ly">
  <img align="middle"
    border="0" src="../27/lily-53af5fae.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>This is the basic structure of all vocal scores.  More staves may
be added as required, more voices may be added to the staves,
more verses may be added to the lyrics,
and the variables containing the music can easily be placed
in separate files should they become too long.

   <p><a name="index-hymn-structure-278"></a>
Here is an example of the first line of a hymn with four
verses, set for SATB.  In this case the words for all four
parts are the same.  Note how we use variables to separate the
music notation and words from the staff structure.  See too
how a variable, which we have chosen to call &lsquo;TimeKey&rsquo;, is used
to hold several commands for use within the two staves.  In other
examples this is often called &lsquo;global&rsquo;.

   <blockquote>
<pre class="verbatim">     
     TimeKey = { \time 4/4 \partial 4 \key c \major}
     SopMusic   = \relative c' { c4 | e4. e8 g4  g  | a a g }
     AltoMusic  = \relative c' { c4 | c4. c8 e4  e  | f f e }
     TenorMusic = \relative c  { e4 | g4. g8 c4. b8 | a8 b c d e4 }
     BassMusic  = \relative c  { c4 | c4. c8 c4  c  | f8 g a b c4 }
     VerseOne   = \lyricmode {
       E -- | ter -- nal fa -- ther, | strong to save, }
     VerseTwo   = \lyricmode {
       O | Christ, whose voice the | wa -- ters heard, }
     VerseThree = \lyricmode {
       O | Ho -- ly Spi -- rit, | who didst brood }
     VerseFour  = \lyricmode {
       O | Tri -- ni -- ty of | love and pow'r }
     
     \score {
       \new ChoirStaff &lt;&lt;
         \new Staff &lt;&lt;
           \clef "treble"
           \new Voice = "Sop"  { \voiceOne \TimeKey \SopMusic }
           \new Voice = "Alto" { \voiceTwo \AltoMusic }
           \new Lyrics \lyricsto "Sop" { \VerseOne   }
           \new Lyrics \lyricsto "Sop" { \VerseTwo   }
           \new Lyrics \lyricsto "Sop" { \VerseThree }
           \new Lyrics \lyricsto "Sop" { \VerseFour  }
         >>
         \new Staff &lt;&lt;
           \clef "bass"
           \new Voice = "Tenor" { \voiceOne \TimeKey \TenorMusic }
           \new Voice = "Bass"  { \voiceTwo \BassMusic  }
         >>
       >>
     }
</pre>
     <p>
 <a href="../20/lily-1e6bbbdc.ly">
  <img align="middle"
    border="0" src="../20/lily-1e6bbbdc.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p><a name="index-verse-and-refrain-279"></a>
We end with an example to show how we might code a solo verse which
continues into a two-part refrain in two staves.  The
positioning of the sequential and simultaneous sections to achieve
this within a single score is quite tricky, so follow the
explanation carefully!

   <p>Let's start with a score block containing a <code>ChoirStaff</code>, as
we would like the brace to appear at the start of the chorus. 
Normally you would need angle brackets after <code>\new ChoirStaff</code>
to bring in all the staves in parallel, but here we want to
defer the parallelism during the solo so we use braces, although
angle brackets here wouldn't hurt.  Inside the <code>ChoirStaff</code> we
want first the staff which will contain the verse.  This must
contain notes and lyrics in parallel, so here we need angle
brackets around the <code>\new Voice</code> and <code>\new Lyrics</code> to
start them at the same time:

   <blockquote>
<pre class="verbatim">     
     versenotes = \relative c'' {
       \clef "treble"
       \key g \major
       \time 3/4 g g g b b b
     }
     versewords = \lyricmode {
       One two three four five six
     }
     \score {
       \new Choirstaff {
         \new Staff &lt;&lt;
           \new Voice = "verse" {
             \versenotes \break
           }
           \new Lyrics \lyricsto verse {
             \versewords
           }
         >>
       }
     }
</pre>
     <p>
 <a href="../94/lily-4b4f5c3f.ly">
  <img align="middle"
    border="0" src="../94/lily-4b4f5c3f.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>That gives the verse line.

   <p>Now we want to continue with refrainA on the same staff while a
second staff is introduced in parallel with it for refrainB, so
this is a parallel section which must be positioned immediately
following the <code>\break</code> in the verse Voice.  Yes, <em>within</em>
the verse Voice!  Here's that parallel section.  More staves
could be introduced here in the same way.

<pre class="example">&lt;&lt;
  \refrainnotesA
  \new Lyrics \lyricsto verse {
    \refrainwordsA
  }
  \new Staff &lt;&lt;
    \new Voice = "refrainB" {
      \refrainnotesB
    }
    \new Lyrics \lyricsto "refrainB" {
      \refrainwordsB
    }
  &gt;&gt;
&gt;&gt;
</pre>
   <p>Here's the final result with two staves in the chorus showing
how the parallel section is positioned within the verse Voice:

   <blockquote>
<pre class="verbatim">     
     versenotes = \relative c'' {
       \clef "treble"
       \key g \major
       \time 3/4 g g g b b b
     }
     refrainnotesA = \relative c'' {
       \time 2/4
       c c g g \bar "|."
     }
     refrainnotesB = \relative c {
       \clef "bass"
       \key g \major
       c e d d
     }
     versewords = \lyricmode {
       One two three four five six
     }
     refrainwordsA = \lyricmode {
       la la la la
     }
     refrainwordsB = \lyricmode {
       dum dum dum dum
     }
     \score {
       \new ChoirStaff {
         \new Staff &lt;&lt;
           \new Voice = "verse" {
             \versenotes \break
             &lt;&lt;
               \refrainnotesA
               \new Lyrics \lyricsto "verse" {
                 \refrainwordsA
               }
               \new Staff &lt;&lt;
                 \new Voice = "refrainB" {
                   \refrainnotesB
                 }
                 \new Lyrics \lyricsto "refrainB" {
                   \refrainwordsB
                 }
               >>
             >>
           }
           \new Lyrics \lyricsto "verse" {
             \versewords
           }
         >>
       }
     }
</pre>
     <p>
 <a href="../e6/lily-700b7dc2.ly">
  <img align="middle"
    border="0" src="../e6/lily-700b7dc2.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p><a name="index-book_002c-example-of-using-280"></a><a name="index-g_t_005cbook-281"></a><a name="index-g_t_005cbook-282"></a>

   <p>However, although this is an interesting and useful exercise to
help you to understand how sequential and simultaneous blocks work,
in practice one would perhaps choose to code this as two
<code>\score</code> blocks within an implicit <code>\book</code> block, as
follows:

   <blockquote>
<pre class="verbatim">     
     versenotes = \relative c'' {
       \clef "treble"
       \key g \major
       \time 3/4 g g g b b b
     }
     refrainnotesA = \relative c'' {
       \time 2/4
       c c g g \bar "|."
     }
     refrainnotesB = \relative c {
       \clef "bass"
       \key g \major
       c e d d
     }
     versewords = \lyricmode {
       One two three four five six
     }
     refrainwordsA = \lyricmode {
       la la la la
     }
     refrainwordsB = \lyricmode {
       dum dum dum dum
     }
     \score {
       \new Staff &lt;&lt;
         \new Voice = "verse" {
           \versenotes
         }
         \new Lyrics \lyricsto "verse" {
           \versewords
         }
       >>
     }
     
     \score {
       \new ChoirStaff &lt;&lt;
         \new Staff &lt;&lt;
           \new Voice = "refrainA" {
             \refrainnotesA
           }
           \new Lyrics \lyricsto "refrainA" {
             \refrainwordsA
           }
         >>
         \new Staff &lt;&lt;
           \new Voice = "refrainB" {
             \refrainnotesB
           }
           \new Lyrics \lyricsto "refrainB" {
             \refrainwordsB
           }
         >>
       >>
     }
</pre>
     <p>
 <a href="../2e/lily-f41574c2.ly">
  <img align="middle"
    border="0" src="../2e/lily-f41574c2.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

<p class="noindent">

<h5 class="subsubheading">See also</h5>

   <p class="indent">

   <p>Notation Reference: <a name="index-Vocal-music-283"></a><a href="../lilypond/Vocal-music.html#Vocal-music">Vocal music</a>.

   <!-- footer_tag --><br><hr>
<div class="node">
<p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Explicitly-instantiating-voices.html#Explicitly-instantiating-voices">Explicitly instantiating voices</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Voices-contain-music.html#Voices-contain-music">Voices contain music</a>
</div>

<div style="background-color: #e8ffe8; padding: 2; border: #c0ffc0 1px solid;">
<p>
<font size="-1">
This page is for LilyPond-2.11.57 (development-branch).
<br>
<address>
Report errors to <a href="http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs">http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs</a>. </address>
<br>
Your <a href="http://lilypond.org/web/devel/participating/documentation-adding">suggestions for the documentation</a> are welcome.
</font>
</p>
</div>


<P>
 Other languages: <a href="Voices-and-vocals.fr.html">français</a>, <a href="Voices-and-vocals.es.html">español</a>.
 <BR>
 
</P>
</BODY></html>