Sophie

Sophie

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

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

<h2 class="unnumbered">Editorial annotations</h2>

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

   <p><a name="adding-fingerings-to-a-score.ly"></a>

<h3 class="unnumberedsec">Adding fingerings to a score</h3>

<p>Fingering instructions can be entered using a simple syntax.

<pre class="verbatim">
\relative c'' {
  c4-1 d-2 f-4 e-3
}
</pre>
<p>
 <a href="../c8/lily-da20b121.ly">
  <img align="middle"
    border="0" src="../c8/lily-da20b121.png" alt="[image of music]">
 </a>
</p>

   <p><a name="allowing-fingerings-to-be-printed-inside-the-staff.ly"></a>

<h3 class="unnumberedsec">Allowing fingerings to be printed inside the staff</h3>

<p>By default, fingering numbers will be printed outside the staff. 
However, this behavior can be canceled.

<pre class="verbatim">
\relative c' {
  &lt;c-1 e-2 g-3 b-5>2
  \once \override Fingering #'staff-padding = #'()
  &lt;c-1 e-2 g-3 b-5>2
}
</pre>
<p>
 <a href="../51/lily-3f70c2ad.ly">
  <img align="middle"
    border="0" src="../51/lily-3f70c2ad.png" alt="[image of music]">
 </a>
</p>

   <p><a name="analysis-brackets-above-the-staff.ly"></a>

<h3 class="unnumberedsec">Analysis brackets above the staff</h3>

<p>Simple horizontal analysis brackets are added below the staff by
default. The following example shows a way to place them above the
staff instead.

<pre class="verbatim">
\layout {
 \context {
   \Voice
   \consists "Horizontal_bracket_engraver"
 }
}
\relative c'' {
 \once \override HorizontalBracket #'direction = #UP
 c2\startGroup
 d\stopGroup
}

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

   <p><a name="applying-note-head-styles-depending-on-the-step-of-the-scale.ly"></a>

<h3 class="unnumberedsec">Applying note head styles depending on the step of the scale</h3>

<p>The <code>shapeNoteStyles</code> property can be used to define various note
head styles for each step of the scale (as set by the key signature or
the "tonic" property). This property requires a set of symbols, which
can be purely arbitrary (geometrical expressions such as
<code>triangle</code>, <code>cross</code>, and <code>xcircle</code> are allowed) or based
on old American engraving tradition (some latin note names are also
allowed).

   <p>That said, to imitate old American song books, there are several
predefined note head styles available through shortcut commands such as
<code>\aikenHeads</code> or <code>\sacredHarpHeads</code>.

   <p>This example shows different ways to obtain shape note heads, and
demonstrates the ability to transpose a melody without losing the
correspondence between harmonic functions and note head styles.

<pre class="verbatim">
fragment = {
  \key c \major
  c2 d
  e2 f
  g2 a
  b2 c
}

\score {
  \new Staff {
    \transpose c d 
    \relative c' {
      \set shapeNoteStyles = #'#(do re mi fa #f la ti)
      \fragment
    }
    
    \relative c' {
      \set shapeNoteStyles  = #'#(cross triangle fa #f mensural xcircle diamond)
      \fragment
    }
  }
}

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

   <p><a name="blanking-staff-lines-using-the--whiteout-command.ly"></a>

<h3 class="unnumberedsec">Blanking staff lines using the \whiteout command</h3>

<p>The <code>\whiteout</code> command underlays a markup with a white box. 
Since staff lines are in a lower layer than most other grobs, this
white box will not overlap any other grob.

<pre class="verbatim">
\layout { ragged-right = ##f }
\relative c' {
  \override TextScript #'extra-offset = #'(2 . 4)
  c2-\markup { \whiteout \pad-markup #0.5 "middle C" } c
} 
</pre>
<p>
 <a href="../56/lily-e5c94de5.ly">
  <img align="middle"
    border="0" src="../56/lily-e5c94de5.png" alt="[image of music]">
 </a>
</p>

   <p><a name="changing-a-single-notes-size-in-a-chord.ly"></a>

<h3 class="unnumberedsec">Changing a single note's size in a chord</h3>

<p>Individual note heads in a chord can be modified with the
<code>\tweak</code> command inside a chord, by altering the <code>font-size</code>
property.

   <p>Inside the chord (within the brackets <code>&lt; &gt;</code>), before the note to
be altered, place the <code>\tweak</code> command, followed by
<code>#'font-size</code> and define the proper size like <code>#-2</code> (a tiny
notehead).

<pre class="verbatim">
\layout { ragged-right = ##t }
\relative {
  &lt;\tweak #'font-size #+2 c e g c \tweak #'font-size #-2 e>1^\markup { A tiny e }_\markup { A big c }
}
</pre>
<p>
 <a href="../69/lily-7e4a3f0d.ly">
  <img align="middle"
    border="0" src="../69/lily-7e4a3f0d.png" alt="[image of music]">
 </a>
</p>

   <p><a name="changing-the-appearance-of-a-slur-from-solid-to-dotted-or-dashed.ly"></a>

<h3 class="unnumberedsec">Changing the appearance of a slur from solid to dotted or dashed</h3>

<p>The appearance of slurs may be changed from solid to dotted or dashed.

<pre class="verbatim">
\relative c' {
  c4( d e c)
  \slurDotted
  c4( d e c)
  \slurSolid
  c4( d e c)
  \slurDashed
  c4( d e c)
  \slurSolid
  c4( d e c)
}

</pre>
<p>
 <a href="../7e/lily-91555c1f.ly">
  <img align="middle"
    border="0" src="../7e/lily-91555c1f.png" alt="[image of music]">
 </a>
</p>

   <p><a name="controlling-the-placement-of-chord-fingerings.ly"></a>

<h3 class="unnumberedsec">Controlling the placement of chord fingerings</h3>

<p>The placement of fingering numbers can be controlled precisely.

<pre class="verbatim">
\relative c' {
  \set fingeringOrientations = #'(left)
  &lt;c-1 e-3 a-5>4
  \set fingeringOrientations = #'(down)
  &lt;c-1 e-3 a-5>4
  \set fingeringOrientations = #'(right)
  &lt;c-1 e-3 a-5>4
  \set fingeringOrientations = #'(up)
  &lt;c-1 e-3 a-5>4
  \set fingeringOrientations = #'(left down)
  &lt;c-1 e-3 a-5>2
  \set fingeringOrientations = #'(up right down)
  &lt;c-1 e-3 a-5>2
}
</pre>
<p>
 <a href="../de/lily-34875599.ly">
  <img align="middle"
    border="0" src="../de/lily-34875599.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="default-direction-of-stems-on-the-center-line-of-the-staff.ly"></a>

<h3 class="unnumberedsec">Default direction of stems on the center line of the staff</h3>

<p>The default direction of stems on the center line of the staff is set
by the <code>Stem</code> property <code>neutral-direction</code>.

<pre class="verbatim">
\relative c'' {
  a4 b c b
  \override Stem #'neutral-direction = #up
  a4 b c b
  \override Stem #'neutral-direction = #down
  a4 b c b
}
</pre>
<p>
 <a href="../d2/lily-0294ff9f.ly">
  <img align="middle"
    border="0" src="../d2/lily-0294ff9f.png" alt="[image of music]">
 </a>
</p>

   <p><a name="embedding-native-postscript-in-a--markup-block.ly"></a>

<h3 class="unnumberedsec">Embedding native PostScript in a \markup block</h3>

<p>PostScript code can be directly inserted inside a <code>\markup</code>
block.

<pre class="verbatim">
% PostScript is a registered trademark of Adobe Systems Inc.

\relative c'' {
  a4-\markup { \postscript #"3 4 moveto 5 3 rlineto stroke" }
  -\markup { \postscript #"[ 0 1 ] 0 setdash 3 5 moveto 5 -3 rlineto stroke " }
  
  b4-\markup { \postscript #"3 4 moveto 0 0 1 2 8 4 20 3.5 rcurveto stroke" }
  s2
  a'1
}
</pre>
<p>
 <a href="../8f/lily-cec3187d.ly">
  <img align="middle"
    border="0" src="../8f/lily-cec3187d.png" alt="[image of music]">
 </a>
</p>

   <p><a name="grid-lines--changing-their-appearance.ly"></a>

<h3 class="unnumberedsec">Grid lines: changing their appearance</h3>

<p>The appearance of grid lines can be changed by overriding some of their
properties.

<pre class="verbatim">
\layout {
 \context {
   \Staff
   % set up grids
   \consists "Grid_point_engraver"
   % set the grid interval to one quarter note
   gridInterval = #(ly:make-moment 1 4)
  }
}

\new Score \with {
 \consists "Grid_line_span_engraver"
 % this moves them to the right half a staff space
 \override NoteColumn #'X-offset = #-0.5
}

\new ChoirStaff &lt;&lt;
  \new Staff {
    \relative c'' {
      \stemUp
      c'4. d8 e8 f g4
    }
  }
  \new Staff {
    \relative c {
      % this moves them up one staff space from the default position
      \override Score.GridLine #'extra-offset = #'(0.0 . 1.0)
      \stemDown
      \clef bass
      \once \override Score.GridLine #'thickness = #5.0
      c4
      \once \override Score.GridLine #'thickness = #1.0
      g'
      \once \override Score.GridLine #'thickness = #3.0
      f
      \once \override Score.GridLine #'thickness = #5.0
      e
    }
  }
>>
</pre>
<p>
 <a href="../50/lily-fa1785ca.ly">
  <img align="middle"
    border="0" src="../50/lily-fa1785ca.png" alt="[image of music]">
 </a>
</p>

   <p><a name="grid-lines--emphasizing-rhythms-and-notes-synchronization.ly"></a>

<h3 class="unnumberedsec">Grid lines: emphasizing rhythms and notes synchronization</h3>

<p>Regular vertical lines can be drawn between staves to show notes
synchronization; however, in case of monophonic music, you may want to
make the second stave invisible, and make the lines shorter like in
this snippet.

<pre class="verbatim">
%% sets of grid
\layout {
 \context {
   \Staff
   \consists "Grid_point_engraver"
   gridInterval = #(ly:make-moment 1 8)
%% lines length
   \override GridPoint #'Y-extent = #'(6 . 0)
 }
 \context {
   \StaffGroup
   \remove "System_start_delimiter_engraver"
 }
}

\layout {
 ragged-right = ##t
}
\new Score
\with {
 \consists "Grid_line_span_engraver"
%% centers grid lines  horizontally below noteheads
 \override NoteColumn #'X-offset = #-0.5
}

\new ChoirStaff &lt;&lt;
 \new Staff
 {
   \time 12/8
   \stemUp
   \relative {
   c'4. d8 e8 f g4 f8 e8.[ d16 c8] }
 }
 \new Staff
 {
%% making sure the lines will be placed outside the Staff
   \override Score.GridLine #'extra-offset = #'( 0.0 . -4.0 )

%% hides staff and notes so that only the grid lines are visible
   \override NoteHead #'transparent = ##t
   \override NoteHead #'no-ledgers = ##t
   \override Stem #'transparent = ##t
   \override Beam #'transparent = ##t
   \override Staff.BarLine #'transparent = ##t
   \override Staff.StaffSymbol #'line-count = #0
   \override Staff.TimeSignature #'transparent = ##t
   \override Staff.Clef #'transparent = ##t

% you have to put 'dummy' notes here to force regular grid spacing...
 \once  \override Score.GridLine #'thickness = #4.0
 c8   c8   c8
 \once  \override Score.GridLine #'thickness = #3.0
 c8   c8   c8
 \once  \override Score.GridLine #'thickness = #4.0
 c8   c8   c8
 \once  \override Score.GridLine #'thickness = #3.0
 c8   c8   c8
 }
>>
</pre>
<p>
 <a href="../a6/lily-f2f405c6.ly">
  <img align="middle"
    border="0" src="../a6/lily-f2f405c6.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>

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