Sophie

Sophie

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

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>Staff notation - 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="Simultaneous-notes.html#Simultaneous-notes" title="Simultaneous notes">
<link rel="next" href="Editorial-annotations.html#Editorial-annotations" title="Editorial annotations">
<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="Staff-notation"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Editorial-annotations.html#Editorial-annotations">Editorial annotations</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Simultaneous-notes.html#Simultaneous-notes">Simultaneous notes</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>

<h2 class="unnumbered">Staff notation</h2>

<p>These snippets illustrate the Notation Reference,
section <a href="../../../Documentation/user/lilypond/Staff-notation.html#Staff-notation">Staff notation</a>.

   <p><a name="adding-ambitus-per-voice.ly"></a>

<h3 class="unnumberedsec">Adding ambitus per voice</h3>

<p>Ambitus can be added per voice. In this case, the ambitus must be moved
manually to prevent collisions.

<pre class="verbatim">
\new Staff &lt;&lt;
  \new Voice \with {
    \consists "Ambitus_engraver"
  } \relative c'' {
    \override Ambitus #'X-offset = #2.0
    \voiceOne
    c4 a d e
    f1
  }
  \new Voice \with {
    \consists "Ambitus_engraver"
  } \relative c' {
    \voiceTwo
    es4 f g as
    b1
  }
>>
</pre>
<p>
 <a href="../4f/lily-6712adbe.ly">
  <img align="middle"
    border="0" src="../4f/lily-6712adbe.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-the-number-of-lines-in-a-staff.ly"></a>

<h3 class="unnumberedsec">Changing the number of lines in a staff</h3>

<p>The number of lines in a staff may changed by overriding the
<code>StaffSymbol</code> property <code>line-count</code>.

<pre class="verbatim">
upper = \relative c'' {
  c4 d e f
}

lower = \relative c {
  \clef bass
  c4 b a g
}

\score {
  \context PianoStaff &lt;&lt;
    \new Staff {
      \upper
    }
    \new Staff {
      \override Staff.StaffSymbol #'line-count = #4 
      \lower
    }
  >>
}
</pre>
<p>
 <a href="../6b/lily-a8184fca.ly">
  <img align="middle"
    border="0" src="../6b/lily-a8184fca.png" alt="[image of music]">
 </a>
</p>

   <p><a name="changing-the-staff-size.ly"></a>

<h3 class="unnumberedsec">Changing the staff size</h3>

<p>Though the simplest way to resize staves is to use
<code>#(set-global-staff-size xx)</code>, an individual staff's size can be
changed by scaling the properties <code>staff-space</code> and
<code>fontSize</code>.

<pre class="verbatim">
&lt;&lt;
  \new Staff \relative c'' {
    \dynamicDown
    c8\ff c c c c c c c
  }
  \new Staff \with {
    fontSize = #-3
    \override StaffSymbol #'staff-space = #(magstep -3)
  } {
    \clef bass
    c8 c c c c\f c c c
  }
>>
</pre>
<p>
 <a href="../33/lily-eb10503d.ly">
  <img align="middle"
    border="0" src="../33/lily-eb10503d.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="display-bracket-with-only-one-staff-in-a-system.ly"></a>

<h3 class="unnumberedsec">Display bracket with only one staff in a system</h3>

<p>If there is only one staff in one of the staff types
<code>ChoirStaff</code>, <code>InnerChoirStaff</code>, <code>InnerStaffGroup</code>
or <code>StaffGroup</code>, the bracket and the starting bar line will not
be displayed as standard behavior.  This can be changed by overriding
the relevant properties, as demonstrated in this example.

   <p>Note that in contexts such as <code>PianoStaff</code> and <code>GrandStaff</code>
where the systems begin with a brace instead of a bracket, another
property has to be set, as shown on the second system in the example.

<pre class="verbatim">
\markup \column {
  \score {
    \new StaffGroup &lt;&lt;
      % Must be lower than the actual number of staff lines
      \override StaffGroup.SystemStartBracket #'collapse-height = #1
      \override Score.SystemStartBar #'collapse-height = #1
      \new Staff {
        c'1
      }
    >>
    \layout { }
  }
  \score {
    \new PianoStaff &lt;&lt;
      \override PianoStaff.SystemStartBrace #'collapse-height = #1
      \override Score.SystemStartBar #'collapse-height = #1
      \new Staff {
        c'1
      }
    >>
    \layout { }
  }
}
</pre>
<p>
 <a href="../60/lily-892f5d56.ly">
  <img align="middle"
    border="0" src="../60/lily-892f5d56.png" alt="[image of music]">
 </a>
</p>

   <p><a name="incipit.ly"></a>

<h3 class="unnumberedsec">Incipit</h3>

<p>Incipits can be added using the instrument name grob, but
keeping separate the instrument name definition and the incipit definition.
<pre class="verbatim">
incipit =
#(define-music-function (parser location incipit-music) (ly:music?)
  #{
    \once \override Staff.InstrumentName #'self-alignment-X = #RIGHT
    \once \override Staff.InstrumentName #'self-alignment-Y = #UP
    \once \override Staff.InstrumentName #'Y-offset = #4
    \once \override Staff.InstrumentName #'padding = #0.3
    \once \override Staff.InstrumentName #'stencil = 
    #(lambda (grob)
       (let* ((instrument-name (ly:grob-property grob 'long-text))
              (layout (ly:output-def-clone (ly:grob-layout grob)))
              (music (make-music 'SequentialMusic
                      'elements (list (make-music 'ContextSpeccedMusic
                                        'context-type 'MensuralStaff
                                        'element (make-music 'PropertySet
                                                   'symbol 'instrumentName
                                                   'value instrument-name))
                                      $incipit-music)))
              (score (ly:make-score music))
              (mm (ly:output-def-lookup layout 'mm))
              (indent (ly:output-def-lookup layout 'indent))
              (width (ly:output-def-lookup layout 'incipit-width))
              (incipit-width (if (number? width)
                                 (* width mm)
                                 (* indent 0.5))))
         (ly:output-def-set-variable! layout 'indent (- indent incipit-width))
         (ly:output-def-set-variable! layout 'line-width indent)
         (ly:output-def-set-variable! layout 'ragged-right #f)
         (ly:output-def-set-variable! layout 'ragged-last #f)
         (ly:output-def-set-variable! layout 'system-count 1)
         (ly:score-add-output-def! score layout)
         (set! (ly:grob-property grob 'long-text)
               (markup #:score score))
         (ly:system-start-text::print grob)))
  #})

%%%%%%%%%%%%%%%%%%%%%%%%%

global = {
  \set Score.skipBars = ##t
  \key g \major
  \time 4/4
  
  %make the staff lines invisible on staves
  \override Staff.BarLine #'transparent = ##t
  % the actual music
  \skip 1*8

  % let finis bar go through all staves
  \override Staff.BarLine #'transparent = ##f

  % finis bar
  \bar "|."
}

discantusIncipit = &lt;&lt;
  \new MensuralVoice = discantusIncipit &lt;&lt;
    \repeat unfold 9 { s1 \noBreak }
    {
      \clef "neomensural-c1"
      \key f \major
      \time 2/2
      c''1.
    }
  >>
  \new Lyrics \lyricsto discantusIncipit { IV- }
>>

discantusNotes = {
  \transpose c' c'' {
    \clef "treble"
    d'2. d'4 |
    b e' d'2 |
    c'4 e'4.( d'8 c' b |
    a4) b a2 |
    b4.( c'8 d'4) c'4 |
    \once \override NoteHead #'transparent = ##t
    c'1 |
    b\breve |
  }
}

discantusLyrics = \lyricmode {
  Ju -- bi -- |
  la -- te De -- |
  o, om --
  nis ter -- |
  ra, __ om- |
  "..." |
  -us. |
}

altusIncipit = &lt;&lt;
  \new MensuralVoice = altusIncipit &lt;&lt;
    \repeat unfold 9 { s1 \noBreak }
    {
      \clef "neomensural-c3"
      \key f \major
      \time 2/2
      r1 f'1.
    }
  >>
  \new Lyrics \lyricsto altusIncipit { IV- }
>>

altusNotes = {
  \transpose c' c'' {
    \clef "treble"
    % two measures
    r2 g2. e4 fis g |
    a2 g4 e |
    fis g4.( fis16 e fis4) |
    g1 |
    \once \override NoteHead #'transparent = ##t
    g1 |
    g\breve |
  }
}

altusLyrics = \lyricmode {
  % two measures
  Ju -- bi -- la -- te |
  De -- o, om -- |
  nis ter -- ra, |
  "..." |
  -us. |
}

tenorIncipit = &lt;&lt;
  \new MensuralVoice = tenorIncipit &lt;&lt;
    \repeat unfold 9 { s1 \noBreak }
    {
      \clef "neomensural-c4"
      \key f \major
      \time 2/2
      r\longa
      r\breve
      r1 c'1.
    }
  >>
  \new Lyrics \lyricsto tenorIncipit { IV- }
>>

tenorNotes = {
  \transpose c' c' {
    \once \override Staff.VerticalAxisGroup #'minimum-Y-extent = #'(-6 . 3)
    \clef "treble_8"
    R1 |
    R1 |
    R1 |
    % two measures
    r2 d'2. d'4 b e' |
    \once \override NoteHead #'transparent = ##t
    e'1 |
    d'\breve |
  }
}

tenorLyrics = \lyricmode {
  % two measures
  Ju -- bi -- la -- te |
  "..." |
  -us. 
}

bassusIncipit = &lt;&lt;
  \new MensuralVoice = bassusIncipit &lt;&lt;
    \repeat unfold 9 { s1 \noBreak }
    {
      \clef "bass"
      \key f \major
      \time 2/2
      %% incipit
      r\maxima
      f1.
    }
  >>
  \new Lyrics \lyricsto bassusIncipit { IV- }
>>

bassusNotes = {
  \transpose c' c' {
    \clef "bass"
    R1 |
    R1 |
    R1 |
    R1 |
    g2. e4 |
    \once \override NoteHead #'transparent = ##t
    e1 |
    g\breve |
  }
}

bassusLyrics = \lyricmode {
  Ju -- bi- |
  "..." |
  -us.
}

\score {
  &lt;&lt;
    \new StaffGroup = choirStaff &lt;&lt;
      \new Voice = "discantusNotes" &lt;&lt;
        \global
        \set Staff.instrumentName = "Discantus"
        \incipit \discantusIncipit
        \discantusNotes
      >>
      \new Lyrics = "discantusLyrics" \lyricsto discantusNotes { \discantusLyrics }
      \new Voice = "altusNotes" &lt;&lt;
        \global
        \set Staff.instrumentName = "Altus"
        \incipit \altusIncipit
        \altusNotes
      >>
      \new Lyrics = "altusLyrics" \lyricsto altusNotes { \altusLyrics }
      \new Voice = "tenorNotes" &lt;&lt;
        \global
        \set Staff.instrumentName = "Tenor"
        \incipit \tenorIncipit
        \tenorNotes
      >>
      \new Lyrics = "tenorLyrics" \lyricsto tenorNotes { \tenorLyrics }
      \new Voice = "bassusNotes" &lt;&lt;
        \set Staff.instrumentName = "Bassus"
        \incipit \bassusIncipit
        \bassusNotes
      >>
    >>
    \new Lyrics = "bassusLyrics" \lyricsto bassusNotes { \bassusLyrics }
    %% Keep the bass lyrics outside of the staff group to avoid bar lines
    %% between the lyrics.
  >>
  \layout {
    \context {
      \Score
      %% no bar lines in staves
      \override BarLine #'transparent = ##t
    }
    %% the next three instructions keep the lyrics between the bar lines
    \context {
      \Lyrics
      \consists "Bar_engraver" 
      \override BarLine #'transparent = ##t
    } 
    \context {
      \StaffGroup
      \consists "Separating_line_group_engraver"
    }
    \context {
      \Voice
      %% no slurs
      \override Slur #'transparent = ##t
      %% Comment in the below "\remove" command to allow line
      %% breaking also at those bar lines where a note overlaps
      %% into the next measure.  The command is commented out in this
      %% short example score, but especially for large scores, you
      %% will typically yield better line breaking and thus improve
      %% overall spacing if you comment in the following command.
      %%\remove "Forbid_line_break_engraver"
    }
    indent=6\cm
    incipit-width = 4\cm
  }
}
</pre>
<p>
 <a href="../67/lily-f7349074.ly">
  <img align="middle"
    border="0" src="../67/lily-f7349074.png" alt="[image of music]">
 </a>
</p>

   <p><a name="inserting-score-fragments-above-a-staff,-as-markups.ly"></a>

<h3 class="unnumberedsec">Inserting score fragments above a staff, as markups</h3>

<p>The <code>\markup</code> command is quite versatile.  In this snippet, it
contains a <code>\score</code> block instead of texts or marks.

<pre class="verbatim">
tuning = \markup {
  \score {
    \new Staff \with { \remove "Time_signature_engraver" }
    {
      \clef bass  &lt;c, g, d g>1
    }
    \layout { ragged-right = ##t }
  }
}

\header {
  title = "Solo Cello Suites"
  subtitle = "Suite IV"
  subsubtitle = \markup { Originalstimmung: \general-align #Y #CENTER \tuning }
}

\layout { ragged-right = ##f }

\relative c'' {
  \time 4/8
  \times 2/3 { c8 d e } \times 2/3 { c d e }
  \times 2/3 { c8 d e } \times 2/3 { c d e }
  g8 a g a
  g8 a g a
}
</pre>
<p>
 <a href="../d5/lily-3acedfa0.ly">
  <img align="middle"
    border="0" src="../d5/lily-3acedfa0.png" alt="[image of music]">
 </a>
</p>

   <p><a name="letter-tablature-formatting.ly"></a>

<h3 class="unnumberedsec">Letter tablature formatting</h3>

<p>Tablature can be formatted using letters instead of
numbers.
<pre class="verbatim">
#(define (letter-tablature-format str context event)
  (let*
      ((tuning (ly:context-property context 'stringTunings))
       (pitch (ly:event-property event 'pitch)))
    (make-whiteout-markup
     (make-vcenter-markup
      (string (integer->char
         (+ (char->integer #\a)
            (- (ly:pitch-semitones pitch)
            (list-ref tuning (- str 1))))))))))

music = \relative c {
  c4 d e f
  g4 a b c
  d4 e f g
}

&lt;&lt;
  \new Staff {
    \clef "G_8"
    \music
  }
  \new TabStaff \with {
    tablatureFormat = #letter-tablature-format
  } {
    \music
  }
>>
</pre>
<p>
 <a href="../06/lily-8b6a0e98.ly">
  <img align="middle"
    border="0" src="../06/lily-8b6a0e98.png" alt="[image of music]">
 </a>
</p>

   <p><a name="making-some-staff-lines-thicker-than-the-others.ly"></a>

<h3 class="unnumberedsec">Making some staff lines thicker than the others</h3>

<p>For pedagogical purposes, a staff line can be thickened (e.g., the
middle line, or to emphasize the line of the G clef).  This can be
achieved by adding extra lines very close to the line that should be
emphasized, using the <code>line-positions</code> property of the
<code>StaffSymbol</code> object.

<pre class="verbatim">
{
  \override Staff.StaffSymbol #'line-positions = #'(-4 -2 -0.2 0 0.2 2 4)
  d'4 e' f' g'
}
</pre>
<p>
 <a href="../88/lily-f408db2d.ly">
  <img align="middle"
    border="0" src="../88/lily-f408db2d.png" alt="[image of music]">
 </a>
</p>

   <p><a name="measure-counter.ly"></a>

<h3 class="unnumberedsec">Measure counter</h3>

<p>This snippet provides a workaround for emitting measure counters using
transparent percent repeats.

<pre class="verbatim">
&lt;&lt;
  \context Voice = "foo" {
    \clef bass
    c4 r g r
    c4 r g r
    c4 r g r
    c4 r g r
  }
  \context Voice = "foo" {
    \set countPercentRepeats = ##t
    \override PercentRepeat #'transparent = ##t
    \override PercentRepeatCounter #'staff-padding = #1
    \repeat percent 4 { s1 }
  }
>>
</pre>
<p>
 <a href="../a1/lily-804e41ff.ly">
  <img align="middle"
    border="0" src="../a1/lily-804e41ff.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="modern-tab-text-clef.ly"></a>

<h3 class="unnumberedsec">Modern TAB text clef</h3>

<p>Use a markup text to replace the (TAB) clef glyph with a modern font.

<pre class="verbatim">
TAB = \markup {
  \raise #1.5
  \sans
  \bold
  \huge
  \override #'(baseline-skip . 2.5)
  \center-column {
    T
    A
    B
  }
}

\new TabStaff {
  \override Staff.Clef #'stencil = #(lambda (grob)
    ly:clef::print (grob-interpret-markup grob TAB))
  a
}
</pre>
<p>
 <a href="../d9/lily-7ff0d7c4.ly">
  <img align="middle"
    border="0" src="../d9/lily-7ff0d7c4.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="non-traditional-key-signatures.ly"></a>

<h3 class="unnumberedsec">Non-traditional key signatures</h3>

<p>The commonly used <code>\key</code> command sets the <code>keySignature</code>
property, in the <code>Staff</code> context.

   <p>To create non-standard key signatures, set this property directly. The
format of this command is a list:

   <p><code> \set Staff.keySignature = #`(((octave . step) . alter) ((octave
. step) . alter) ...) </code> where, for each element in the list,
<code>octave</code> specifies the octave (0 being the octave from middle C to
the B above), <code>step</code> specifies the note within the octave (0 means
C and 6 means B), and <code>alter</code> is <code>,SHARP ,FLAT ,DOUBLE-SHARP</code>
etc. (Note the leading comma.)

   <p>Alternatively, for each item in the list, using the more concise format
<code>(step . alter)</code> specifies that the same alteration should hold in
all octaves.

   <p>Here is an example of a possible key signature for generating a
whole-tone scale:

<pre class="verbatim">
\relative c' {
  \set Staff.keySignature = #`(((0 .  3) . ,SHARP) ((0 . 5) . ,FLAT) ((0 . 6) . ,FLAT))
  c4 d e fis
  aes4 bes c2
}

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

   <p><a name="printing-metronome-and-rehearsal-marks-below-the-staff.ly"></a>

<h3 class="unnumberedsec">Printing metronome and rehearsal marks below the staff</h3>

<p>By default, metronome and rehearsal marks are printed above the staff. 
To place them below the staff simply set the <code>direction</code> property
of <code>MetronomeMark</code> or <code>RehearsalMark</code> appropriately.

<pre class="verbatim">
\layout { ragged-right = ##f }

{
  % Metronome marks below the staff 
  \override Score.MetronomeMark #'direction = #DOWN
  \tempo 8. = 120
  c''1

  % Rehearsal marks below the staff
  \override Score.RehearsalMark #'direction = #DOWN
  \mark \default
  c''1
}
</pre>
<p>
 <a href="../4a/lily-cfdefdd1.ly">
  <img align="middle"
    border="0" src="../4a/lily-cfdefdd1.png" alt="[image of music]">
 </a>
</p>

   <p><a name="quoting-another-voice-with-transposition.ly"></a>

<h3 class="unnumberedsec">Quoting another voice with transposition</h3>

<p>Quotations take into account the transposition of both
source and target.  In this example, all instruments play sounding
middle C; the target is an instrument in F.  The target part may be
transposed using <code>\transpose</code>.  In this case, all the pitches
(including the quoted ones) are transposed.

<pre class="verbatim">
\addQuote clarinet {
  \transposition bes
  \repeat unfold 8 { d'16 d' d'8 }
}

\addQuote sax {
  \transposition es'
  \repeat unfold 16 { a8 }
}

quoteTest = {
  % french horn
  \transposition f
  g'4
  &lt;&lt; \quoteDuring #"clarinet" { \skip 4 } s4^"clar." >>
  &lt;&lt; \quoteDuring #"sax" { \skip 4 } s4^"sax." >>
  g'4
}

{
  \set Staff.instrumentName = \markup \center-column { Horn \line { in F } }
  \quoteTest
  \transpose c' d' &lt;&lt; \quoteTest s4_"up a tone" >>
}
</pre>
<p>
 <a href="../9f/lily-2747fcc3.ly">
  <img align="middle"
    border="0" src="../9f/lily-2747fcc3.png" alt="[image of music]">
 </a>
</p>

   <p><a name="quoting-another-voice.ly"></a>

<h3 class="unnumberedsec">Quoting another voice</h3>

<p>With <code>\quote</code>, fragments of previously entered
music may be quoted.  <code>quotedEventTypes</code> will determines which
items are quoted.  In this example, a 16th rest is not quoted, since
<code>rest-event</code> is not in <code>quotedEventTypes</code>.
<pre class="verbatim">
quoteMe = \relative c' { fis4 r16  a8.-> b4-\ff c }

\addQuote quoteMe \quoteMe
original = \relative c'' {
  c8 d s2
  \once \override NoteColumn #'ignore-collision = ##t
  es8 gis8
}

&lt;&lt;
  \new Staff {
    \set Staff.instrumentName = #"quoteMe"
    \quoteMe
  }
  \new Staff {
    \set Staff.instrumentName = #"orig"
    \original
  }
  \new Staff \relative c'' &lt;&lt;
    \set Staff.instrumentName = #"orig+quote"
    \set Staff.quotedEventTypes = #'(note-event articulation-event)
    \original
    \new Voice {
      s4
	    \set fontSize = #-4
	    \override Stem #'length-fraction = #(magstep -4)
	    \quoteDuring #"quoteMe" { \skip 2. }
    }
  >>
>>
</pre>
<p>
 <a href="../5b/lily-e1299e79.ly">
  <img align="middle"
    border="0" src="../5b/lily-e1299e79.png" alt="[image of music]">
 </a>
</p>

   <p><a name="removing-the-first-empty-line.ly"></a>

<h3 class="unnumberedsec">Removing the first empty line</h3>

<p>The first empty staff can also be removed from the score by setting the
<code>VerticalAxisGroup</code> property <code>remove-first</code>. This can be done
globally inside the <code>\layout</code> block, or locally inside the
specific staff that should be removed.  In the latter case, you have to
specify the context (<code>Staff</code> applies only to the current staff) in
front of the property.

   <p>The lower staff of the second staff group is not removed, because the
setting applies only to the specific staff inside of which it is
written.

<pre class="verbatim">
\layout {
  \context { 
    \RemoveEmptyStaffContext 
    % To use the setting globally, uncomment the following line:
    % \override VerticalAxisGroup #'remove-first = ##t
  }
}
\new StaffGroup &lt;&lt;
  \new Staff \relative c' {
    e4 f g a \break
    c1
  }
  \new Staff {
    % To use the setting globally, comment this line,
    % uncomment the line in the \layout block above
    \override Staff.VerticalAxisGroup #'remove-first = ##t
    R1 \break
    R
  }
>>
\new StaffGroup &lt;&lt;
  \new Staff \relative c' {
    e4 f g a \break
    c1
  }
  \new Staff {
    R1 \break
    R
  }
>>
</pre>
<p>
 <a href="../e7/lily-3d411fb4.ly">
  <img align="middle"
    border="0" src="../e7/lily-3d411fb4.png" alt="[image of music]">
 </a>
</p>

   <p><a name="time-signature-in-parentheses.ly"></a>

<h3 class="unnumberedsec">Time signature in parentheses</h3>

<p>The time signature can be enclosed within parentheses.

<pre class="verbatim">
\relative c'' {
  \override Staff.TimeSignature #'stencil = #(lambda (grob)
    (bracketify-stencil (ly:time-signature::print grob) Y 0.1 0.2 0.1))
  \time 2/4
  a4 b8 c
}
</pre>
<p>
 <a href="../52/lily-bb42503d.ly">
  <img align="middle"
    border="0" src="../52/lily-bb42503d.png" alt="[image of music]">
 </a>
</p>

   <p><a name="tweaking-clef-properties.ly"></a>

<h3 class="unnumberedsec">Tweaking clef properties</h3>

<p>The command <code>\clef "treble_8"</code> is equivalent to setting
<code>clefGlyph</code>, <code>clefPosition</code> (which controls the vertical
position of the clef), <code>middleCPosition</code> and
<code>clefOctavation</code>. A clef is printed when any of the properties
except <code>middleCPosition</code> are changed.

   <p>Note that changing the glyph, the position of the clef, or the
octavation does not in itself change the position of subsequent notes
on the staff: the position of middle C must also be specified to do
this. The positional parameters are relative to the staff center line,
positive numbers displacing upwards, counting one for each line and
space. The <code>clefOctavation</code> value would normally be set to 7, -7,
15 or -15, but other values are valid.

   <p>When a clef change takes place at a line break the new clef symbol is
printed at both the end of the previous line and the beginning of the
new line by default. If the warning clef at the end of the previous
line is not required it can be suppressed by setting the <code>Staff</code>
property <code>explicitClefVisibility</code> to the value
<code>end-of-line-invisible</code>. The default behavior can be recovered
with  <code>\unset Staff.explicitClefVisibility</code>.

   <p>The following examples show the possibilities when setting these
properties manually. On the first line, the manual changes preserve the
standard relative positioning of clefs and notes, whereas on the second
line, they do not.

<pre class="verbatim">
{
  % The default treble clef
  c'1
  % The standard bass clef
  \set Staff.clefGlyph = #"clefs.F"
  \set Staff.clefPosition = #2
  \set Staff.middleCPosition = #6
  c'1
  % The baritone clef
  \set Staff.clefGlyph = #"clefs.C"
  \set Staff.clefPosition = #4
  \set Staff.middleCPosition = #4
  c'1
  % The standard choral tenor clef
  \set Staff.clefGlyph = #"clefs.G"
  \set Staff.clefPosition = #-2
  \set Staff.clefOctavation = #-7
  \set Staff.middleCPosition = #1
  c'1
  % A non-standard clef
  \set Staff.clefPosition = #0
  \set Staff.clefOctavation = #0
  \set Staff.middleCPosition = #-4
  c'1 \break

  % The following clef changes do not preserve
  % the normal relationship between notes and clefs:

  \set Staff.clefGlyph = #"clefs.F"
  \set Staff.clefPosition = #2
  c'1
  \set Staff.clefGlyph = #"clefs.G"
  c'1
  \set Staff.clefGlyph = #"clefs.C"
  c'1
  \set Staff.clefOctavation = #7
  c'1
  \set Staff.clefOctavation = #0
  \set Staff.clefPosition = #0
  c'1
  
  % Here we go back to the normal clef:

  \set Staff.middleCPosition = #0
  c'1
}
</pre>
<p>
 <a href="../60/lily-919dc097.ly">
  <img align="middle"
    border="0" src="../60/lily-919dc097.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="volta-below-chords.ly"></a>

<h3 class="unnumberedsec">Volta under chords</h3>

<p>By adding the <code>Volta_engraver</code> to the relevant
staff, volte can be put under chords.
<pre class="verbatim">
\score {
  &lt;&lt;
    \chords {
      c1
      c1
    }
    \new Staff \with { \consists "Volta_engraver" } {
      \repeat volta 2 { c'1 }
      \alternative { c' }
    }
  >>
  \layout {
    \context {
      \Score
      \remove "Volta_engraver"
    }
  }
}
</pre>
<p>
 <a href="../22/lily-5adaa60e.ly">
  <img align="middle"
    border="0" src="../22/lily-5adaa60e.png" alt="[image of music]">
 </a>
</p>

   <p><a name="volta-multi-staff.ly"></a>

<h3 class="unnumberedsec">Volta multi-staff</h3>

<p>By adding the <code>Volta_engraver</code> to the relevant
staff, volte can be put over staves other than the topmost
one in a score.
<pre class="verbatim">
voltaMusic = \relative c'' {
  \repeat volta 2 {
    c1
  }
  \alternative {
    d1
    e
  }
}

&lt;&lt;
  \new StaffGroup &lt;&lt;
    \context Staff \voltaMusic
    \new Staff \voltaMusic
  >>
  \new StaffGroup &lt;&lt;
    \new Staff \with { \consists "Volta_engraver" }
      \voltaMusic
    \new Staff \voltaMusic
  >>
>>
</pre>
<p>
 <a href="../63/lily-2dcbf660.ly">
  <img align="middle"
    border="0" src="../63/lily-2dcbf660.png" alt="[image of music]">
 </a>
</p>

   <!-- footer_tag --><br><hr>
<div class="node">
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Editorial-annotations.html#Editorial-annotations">Editorial annotations</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Simultaneous-notes.html#Simultaneous-notes">Simultaneous notes</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>