Sophie

Sophie

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

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>Contexts and engravers - LilyPond snippets</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="LilyPond snippets">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="World-music.html#World-music" title="World music">
<link rel="next" href="Tweaks-and-overrides.html#Tweaks-and-overrides" title="Tweaks and overrides">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<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="Contexts-and-engravers"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Tweaks-and-overrides.html#Tweaks-and-overrides">Tweaks and overrides</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="World-music.html#World-music">World music</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>

<h2 class="unnumbered">Contexts and engravers</h2>

<!-- FIXME make xref more precise when the chapter has been -->
<!-- revised in GDP -->
<p>These snippets illustrate the Notation Reference,
section <a href="../../../Documentation/user/lilypond/Changing-defaults.html#Changing-defaults">Changing defaults</a>.

   <p>See also Learning Manual, section
<a href="../../../Documentation/user/lilypond-learning/Contexts-and-engravers.html#Contexts-and-engravers">Contexts and engravers</a>.

   <p><a name="adding-a-figured-bass-above-or-below-the-notes.ly"></a>

<h3 class="unnumberedsec">Adding a figured bass above or below the notes</h3>

<p>When writing a figured bass, here's a way to specify if you want your
figures to be placed above or below the bass notes, by defining the
<code>BassFigureAlignmentPositioning #'direction</code> property (exclusively
in a <code>Staff</code> context). Choices are <code>#UP</code> (or <code>#1</code>),
<code>#CENTER</code> (or <code>#0</code>) and <code>#DOWN</code> (or <code>#-1</code>).

   <p>As you can see here, this property can be changed as many times as you
wish. Use <code>\once \override</code> if you don't want the tweak to apply
to the whole score.

<pre class="verbatim">
bass = { \clef bass g4 b, c d e d8 c d2}
continuo = \figuremode {
         &lt; _ >4 &lt; 6 >8   
   \once \override Staff.BassFigureAlignmentPositioning #'direction = #CENTER
         &lt;5/>  &lt; _ >4 
   \override Staff.BassFigureAlignmentPositioning #'direction = #UP
         &lt; _+ > &lt; 6 >
   \set Staff.useBassFigureExtenders = ##t
   \override Staff.BassFigureAlignmentPositioning #'direction = #DOWN
         &lt; 4 >4. &lt; 4 >8 &lt; _+ >4
       } 
\score {
    &lt;&lt; \new Staff = bassStaff \bass 
    \context Staff = bassStaff \continuo >>
}

</pre>
<p>
 <a href="../c3/lily-30b0c753.ly">
  <img align="middle"
    border="0" src="../c3/lily-30b0c753.png" alt="[image of music]">
 </a>
</p>

   <p><a name="adding-an-extra-staff-at-a-line-break.ly"></a>

<h3 class="unnumberedsec">Adding an extra staff at a line break</h3>

<p>When adding a new staff at a line break, some extra space is
unfortunately added at the end of the line before the break (to fit in
a key signature change, which  will never be printed anyway). The
workaround is to add a setting of
<code>Staff.explicitKeySignatureVisibility</code> as is shown in the example. 
In versions 2.10 and earlier, a similar setting for the time signatures
is also required (see the example).

<pre class="verbatim">
\score {
  \new StaffGroup \relative c'' {
    \new Staff
    \key f \major
    c1 c^"Unwanted extra space" \break
    &lt;&lt; { c1 c }
       \new Staff {
         \key f \major
         \once \override Staff.TimeSignature #'stencil = ##f
         c1 c 
       } 
    >>
    c1 c^"Fixed here" \break
    &lt;&lt; { c1 c }
       \new Staff {
         \once \set Staff.explicitKeySignatureVisibility = #end-of-line-invisible
         % The next line is not needed in 2.11.x or later:
         \once \override Staff.TimeSignature #'break-visibility = #end-of-line-invisible
         \key f \major
         \once \override Staff.TimeSignature #'stencil = ##f
         c1 c
       }
    >>
  }
}
</pre>
<p>
 <a href="../84/lily-0b4b70af.ly">
  <img align="middle"
    border="0" src="../84/lily-0b4b70af.png" alt="[image of music]">
 </a>
</p>

   <p><a name="adding-an-extra-staff.ly"></a>

<h3 class="unnumberedsec">Adding an extra staff</h3>

<p>An extra staff can be added (possibly temporarily) after the start of a
piece.

<pre class="verbatim">
\score {
  &lt;&lt;
    \new Staff \relative c'' { c1 c c c c }
    \new StaffGroup \relative c'' {
      \new Staff {
        c1 c
        &lt;&lt; c1 \new Staff { \once \override Staff.TimeSignature #'stencil = ##f c1 } >>
        c
      }
    }
  >>
}
</pre>
<p>
 <a href="../47/lily-264ca3ec.ly">
  <img align="middle"
    border="0" src="../47/lily-264ca3ec.png" alt="[image of music]">
 </a>
</p>

   <p><a name="changing-midi-output-to-one-channel-per-voice.ly"></a>

<h3 class="unnumberedsec">Changing MIDI output to one channel per voice</h3>

<p>When outputting MIDI, the default behavior is for each staff to
represent one MIDI channel, with all the voices on a staff amalgamated. 
This minimizes the risk of running out of MIDI channels, since there
are only 16 available per track.

   <p>However, by moving the <code>Staff_performer</code> to the <code>Voice</code>
context, each voice on a staff can have its own MIDI channel, as is
demonstrated by the following example: despite being on the same staff,
two MIDI channels are created, each with a different
<code>midiInstrument</code>.

<pre class="verbatim">
\score {
  \new Staff &lt;&lt;
    \new Voice \relative c''' {
      \set midiInstrument = #"flute"
      \voiceOne
      \key g \major
      \time 2/2
      r2 g-"Flute" ~
      g fis ~
      fis4 g8 fis e2 ~
      e4 d8 cis d2
    }
    \new Voice \relative c'' {
      \set midiInstrument = #"clarinet"
      \voiceTwo
      b1-"Clarinet"
      a2. b8 a
      g2. fis8 e
      fis2 r
    }
  >>
  \layout { }
  \midi {
    \context {
      \Staff
      \remove "Staff_performer"
    }
    \context {
      \Voice
      \consists "Staff_performer"      
    }
    \context {
      \Score
      tempoWholesPerMinute = #(ly:make-moment 72 2)
    }
  }
}
</pre>
<p>
 <a href="../8a/lily-042a2177.ly">
  <img align="middle"
    border="0" src="../8a/lily-042a2177.png" alt="[image of music]">
 </a>
</p>

   <p><a name="changing-time-signatures-inside-a-polymetric-section-using-scaledurations.ly"></a>

<h3 class="unnumberedsec">Changing time signatures inside a polymetric section using <code>\scaleDurations</code></h3>

<p>The <code>measureLength</code> property, together with
<code>measurePosition</code>, determines when a bar line is needed.  However,
when using <code>\scaleDurations</code>, the scaling of durations makes it
difficult to change time signatures.  In this case, <code>measureLength</code>
should be set manually, using the <code>ly:make-moment</code> callback.  The
second argument must be the same as the second argument of
<code>\scaleDurations</code>.
<pre class="verbatim">
\layout {
  \context {
    \Score
    \remove "Timing_translator"
    \remove "Default_bar_line_engraver"
  }
  \context {
    \Staff
    \consists "Timing_translator"
    \consists "Default_bar_line_engraver"
  }
}

&lt;&lt;
  \new Staff {
    \scaleDurations #'(8 . 5) {
      \time 6/8
      \set Timing.measureLength = #(ly:make-moment 3 5)
      b8 b b b b b
      \time 2/4
      \set Timing.measureLength = #(ly:make-moment 2 5)
      b4 b
    }
  }
  \new Staff {
    \clef bass
    \time 2/4
    c2 d e f
  }
>>
</pre>
<p>
 <a href="../9e/lily-7717a836.ly">
  <img align="middle"
    border="0" src="../9e/lily-7717a836.png" alt="[image of music]">
 </a>
</p>

   <p><a name="chant-or-psalms-notation.ly"></a>

<h3 class="unnumberedsec">Chant or psalms notation</h3>

<p>This form of notation is used for the chant of the Psalms, where verses
aren't always the same length.

<pre class="verbatim">
stemOn = { \override Staff.Stem #'transparent = ##f }
stemOff = { \override Staff.Stem #'transparent = ##t }

\score {
  \new Staff \with { \remove "Time_signature_engraver" }
  {
    \key g \minor
    \set Score.timing = ##f
    \stemOff a'\breve bes'4 g'4
    \stemOn a'2 \bar "||"
    \stemOff a'\breve g'4 a'4
    \stemOn f'2 \bar "||"
    \stemOff a'\breve^\markup { \italic flexe }
    \stemOn g'2 \bar "||"
  }
}
</pre>
<p>
 <a href="../36/lily-43a8112c.ly">
  <img align="middle"
    border="0" src="../36/lily-43a8112c.png" alt="[image of music]">
 </a>
</p>

   <p><a name="creating-blank-staves.ly"></a>

<h3 class="unnumberedsec">Creating blank staves</h3>

<p>To create blank staves, generate empty measures then remove the
<code>Bar_number_engraver</code> from the <code>Score</code> context, and the
<code>Time_signature_engraver</code>, <code>Clef_engraver</code> and
<code>Bar_engraver</code> from the <code>Staff</code> context.

<pre class="verbatim">
#(set-global-staff-size 20)

\score {
  { 
    \repeat unfold 12 { s1 \break } 
  }
  \layout {
    indent = 0\in
    \context {
      \Staff
      \remove "Time_signature_engraver"
      \remove "Clef_engraver"
      \remove "Bar_engraver"
    }
    \context {
      \Score
      \remove "Bar_number_engraver"
    }
  }
}

\paper {
  #(set-paper-size "letter")
  ragged-last-bottom = ##f
  line-width = 7.5\in
  left-margin = 0.5\in
  bottom-margin = 0.25\in
  top-margin = 0.25\in
}
</pre>
<p>
 <a href="../63/lily-e0186df5.ly">
  <img align="middle"
    border="0" src="../63/lily-e0186df5.png" alt="[image of music]">
 </a>
</p>

   <p><a name="engravers-one-by-one.ly"></a>

<h3 class="unnumberedsec">Engravers one-by-one</h3>

<p>The notation problem, creating a certain symbol, is handled by plugins. 
Each plugin is called an Engraver. In this example, engravers are
switched on one by one, in the following order:

   <p>- note heads

   <p>- staff symbol,

   <p>- clef,

   <p>- stem,

   <p>- beams, slurs, accents,

   <p>- accidentals, bar lines, time signature, and key signature.

   <p>Engravers are grouped. For example, note heads, slurs, beams etc. form
a Voice context. Engravers for key, accidental, bar, etc. form a Staff
context.

   <p>You may only see the first example in this document; please download
this snippet and run it from your own computer.

<pre class="verbatim">
%% sample music
topVoice =  \relative c' {
  \key d\major
  es8([ g] a[ fis])
  b4
  b16[-. b-. b-. cis-.]
  d4->
}

botVoice =  \relative c' {
  \key d\major
  c8[( f] b[ a)]
  es4
  es16[-. es-. es-. fis-.]
  b4->
}

hoom =  \relative c {
  \key d \major
  \clef bass
  g8-. r
  r4 
  fis8-.
  r8
  r4
  b'4->
}

pah =  \relative c' {
  r8 b-.
  r4
  r8 g8-.
  r16 g-. r8
  \clef treble
  fis'4->
}

%
% setup for Request->Element conversion. Guru-only
%

MyStaff =\context {
  \type "Engraver_group"
  \name Staff

  \description "Handles clefs, bar lines, keys, accidentals.  It can contain
@code{Voice} contexts."

  
  \consists "Output_property_engraver"	
  
  \consists "Font_size_engraver"

  \consists "Volta_engraver"
  \consists "Separating_line_group_engraver"	
  \consists "Dot_column_engraver"

  \consists "Ottava_spanner_engraver"
  \consists "Rest_collision_engraver"
  \consists "Piano_pedal_engraver"
  \consists "Piano_pedal_align_engraver"
  \consists "Instrument_name_engraver"
  \consists "Grob_pq_engraver"
  \consists "Forbid_line_break_engraver"
  \consists "Axis_group_engraver"

  \consists "Pitch_squash_engraver"

  \override VerticalAxisGroup #'minimum-Y-extent = #'(-6 . 6)
  extraVerticalExtent = ##f
  verticalExtent = ##f 
  localKeySignature = #'()

				% explicitly set instrument, so we don't get 
				% weird effects when doing instrument names for
				% piano staves

  instrumentName = #'()
  shortInstrumentName = #'()
  
  \accepts "Voice"
}


MyVoice = \context {
  \type "Engraver_group"
  \name Voice

  \description "
    Corresponds to a voice on a staff.  This context handles the
    conversion of dynamic signs, stems, beams, super- and subscripts,
    slurs, ties, and rests.

    You have to instantiate this explicitly if you want to have
    multiple voices on the same staff."

  localKeySignature = #'()
  \consists "Font_size_engraver"
  
				% must come before all
  \consists "Output_property_engraver"	
  \consists "Arpeggio_engraver"
  \consists "Multi_measure_rest_engraver"
  \consists "Text_spanner_engraver"
  \consists "Grob_pq_engraver"
  \consists "Note_head_line_engraver"
  \consists "Glissando_engraver"
  \consists "Ligature_bracket_engraver"
  \consists "Breathing_sign_engraver"
				% \consists "Rest_engraver"
  \consists "Grace_beam_engraver"
  \consists "New_fingering_engraver"
  \consists "Chord_tremolo_engraver"
  \consists "Percent_repeat_engraver"
  \consists "Slash_repeat_engraver"

%{
  Must come before text_engraver, but after note_column engraver.

%}
  \consists "Text_engraver"
  \consists "Dynamic_engraver"
  \consists "Fingering_engraver"

  \consists "Script_column_engraver"
  \consists "Rhythmic_column_engraver"
  \consists "Cluster_spanner_engraver"
  \consists "Tie_engraver"
  \consists "Tie_engraver"
  \consists "Tuplet_engraver"
  \consists "Note_heads_engraver"
  \consists "Rest_engraver"

  \consists "Skip_event_swallow_translator"
}


\score {
  \topVoice
  \layout {
    \context { \MyStaff }
    \context { \MyVoice }
  }
}


MyStaff = \context {
    \MyStaff
    \consists "Staff_symbol_engraver"
}

\score {
  \topVoice
  \layout {
      \context { \MyStaff }
      \context { \MyVoice }
            }
}

MyStaff = \context {
    \MyStaff
    \consists "Clef_engraver"
    \remove "Pitch_squash_engraver"
}

\score {
  \topVoice
  \layout {
    \context { \MyStaff }
    \context { \MyVoice }
  }
}

MyVoice = \context {
  \MyVoice
  \consists "Stem_engraver"
}

\score {
  \topVoice
  \layout {
    \context { \MyStaff }
    \context { \MyVoice }
  }
}

MyVoice = \context {
  \MyVoice
  \consists "Beam_engraver"
}

\score {
  \topVoice
  \layout {
    \context { \MyStaff }
    \context { \MyVoice }
  }
}

MyVoice= \context {
  \MyVoice
  \consists "Phrasing_slur_engraver"
  \consists "Slur_engraver"
  \consists "Script_engraver"
}


\score {
  \topVoice
  \layout {
    \context { \MyStaff }
    \context { \MyVoice }
  }
}

MyStaff = \context {
  \MyStaff
  \consists "Bar_engraver"
  \consists "Time_signature_engraver"
}

\score {
  \topVoice
  \layout {
    \context { \MyStaff }
    \context { \MyVoice }
  }
}

MyStaff = \context {
  \MyStaff
  \consists "Accidental_engraver"    
  \consists "Key_engraver"
}
\score {
  \topVoice
  \layout {
    \context { \MyStaff }
    \context { \MyVoice }
  }
}

</pre>
<p>
 <a href="../d2/lily-2353f255.ly">
  <img align="middle"
    border="0" src="../d2/lily-2353f255.png" alt="[image of music]">
 </a>
</p>

   <p><a name="mensurstriche-layout-bar-lines-between-the-staves.ly"></a>

<h3 class="unnumberedsec">Mensurstriche layout (bar lines between the staves)</h3>

<p>The mensurstriche-layout where the bar lines do not show on the staves
but between staves can be achieved with a <code>StaffGroup</code> instead of
a <code>ChoirStaff</code>.  The bar line on staves is blanked out by setting
the <code>transparent</code> property.

<pre class="verbatim">
global = {
  \override Staff.BarLine #'transparent = ##t
  s1 s
  % the final bar line is not interrupted
  \revert Staff.BarLine #'transparent
  \bar "|."
}
\new StaffGroup \relative c'' {
  &lt;&lt;
    \new Staff { &lt;&lt; \global { c1 c } >> }
    \new Staff { &lt;&lt; \global { c c } >> }
  >>
}
</pre>
<p>
 <a href="../d4/lily-0139e5aa.ly">
  <img align="middle"
    border="0" src="../d4/lily-0139e5aa.png" alt="[image of music]">
 </a>
</p>

   <p><a name="nesting-staves.ly"></a>

<h3 class="unnumberedsec">Nesting staves</h3>

<p>The property <code>systemStartDelimiterHierarchy</code> can be used to make
more complex nested staff groups. The command <code>\set
StaffGroup.systemStartDelimiterHierarchy</code> takes an alphabetical list of
the number of staves produced. Before each staff a system start
delimiter can be given. It has to be enclosed in brackets and takes as
much staves as the brackets enclose. Elements in the list can be
omitted, but the first bracket takes always the complete number of
staves. The possibilities are <code>SystemStartBar</code>,
<code>SystemStartBracket</code>, <code>SystemStartBrace</code>, and
<code>SystemStartSquare</code>.

<pre class="verbatim">
\new StaffGroup
\relative c'' &lt;&lt;
  \set StaffGroup.systemStartDelimiterHierarchy
    = #'(SystemStartSquare (SystemStartBrace (SystemStartBracket a
                             (SystemStartSquare b)  ) c ) d)
  \new Staff { c1 }
  \new Staff { c1 }
  \new Staff { c1 }
  \new Staff { c1 }
  \new Staff { c1 }
>>
</pre>
<p>
 <a href="../c2/lily-70d9e59c.ly">
  <img align="middle"
    border="0" src="../c2/lily-70d9e59c.png" alt="[image of music]">
 </a>
</p>

   <p><a name="use-square-bracket-at-the-start-of-a-staff-group.ly"></a>

<h3 class="unnumberedsec">Use square bracket at the start of a staff group</h3>

<p>The system start delimiter <code>SystemStartSquare</code> can be used by
setting it explicitly in a <code>StaffGroup</code> or <code>ChoirStaffGroup</code>
context.

<pre class="verbatim">
\score {
  \new StaffGroup { &lt;&lt; 
  \set StaffGroup.systemStartDelimiter = #'SystemStartSquare
    \new Staff { c'4 d' e' f' }
    \new Staff { c'4 d' e' f' }
  >> }
}
</pre>
<p>
 <a href="../6a/lily-bc90db5c.ly">
  <img align="middle"
    border="0" src="../6a/lily-bc90db5c.png" alt="[image of music]">
 </a>
</p>

   <p><a name="vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly"></a>

<h3 class="unnumberedsec">Vocal ensemble template with lyrics aligned below and above the staves</h3>

<p>This template is basically the same as the simple "Vocal ensemble"
template, with the exception that here all the lyrics lines are placed
using <code>alignAboveContext</code> and <code>alignBelowContext</code>.

<pre class="verbatim">
global = {
  \key c \major
  \time 4/4
}

sopMusic = \relative c'' {
  c4 c c8[( b)] c4
}
sopWords = \lyricmode {
  hi hi hi hi
}

altoMusic = \relative c' {
  e4 f d e
}
altoWords = \lyricmode {
  ha ha ha ha
}

tenorMusic = \relative c' {
  g4 a f g
}
tenorWords = \lyricmode {
  hu hu hu hu
}

bassMusic = \relative c {
  c4 c g c
}
bassWords = \lyricmode {
  ho ho ho ho
}

\score {
  \new ChoirStaff &lt;&lt;
    \new Staff = women &lt;&lt;
      \new Voice = "sopranos" { \voiceOne &lt;&lt; \global \sopMusic >> }
      \new Voice = "altos" { \voiceTwo &lt;&lt; \global \altoMusic >> }
    >>
    \new Lyrics \with { alignAboveContext = women } \lyricsto sopranos \sopWords
    \new Lyrics \with { alignBelowContext = women } \lyricsto altos \altoWords
    % we could remove the line about this with the line below, since we want
    % the alto lyrics to be below the alto Voice anyway.
    % \new Lyrics \lyricsto altos \altoWords
    
    \new Staff = men &lt;&lt;
      \clef bass
      \new Voice = "tenors" { \voiceOne &lt;&lt; \global \tenorMusic >> }
      \new Voice = "basses" { \voiceTwo &lt;&lt; \global \bassMusic >> }
    >>
    \new Lyrics \with { alignAboveContext = men } \lyricsto tenors \tenorWords
    \new Lyrics \with { alignBelowContext = men } \lyricsto basses \bassWords
    % again, we could replace the line above this with the line below.
    % \new Lyrics \lyricsto basses \bassWords
  >>
  \layout {
    \context {
      % a little smaller so lyrics
      % can be closer to the staff
      \Staff
      \override VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3)
    }
  }
}
</pre>
<p>
 <a href="../f3/lily-a11d4879.ly">
  <img align="middle"
    border="0" src="../f3/lily-a11d4879.png" alt="[image of music]">
 </a>
</p>

   <!-- footer_tag --><br><hr>
<div class="node">
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Tweaks-and-overrides.html#Tweaks-and-overrides">Tweaks and overrides</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="World-music.html#World-music">World music</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</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>

</BODY></html>