Sophie

Sophie

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

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>Grace notes - GNU LilyPond Notation Reference</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="GNU LilyPond Notation Reference">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Special-rhythmic-concerns.html#Special-rhythmic-concerns" title="Special rhythmic concerns">
<link rel="next" href="Aligning-to-cadenzas.html#Aligning-to-cadenzas" title="Aligning to cadenzas">
<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="Grace-notes"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Aligning-to-cadenzas.html#Aligning-to-cadenzas">Aligning to cadenzas</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Special-rhythmic-concerns.html#Special-rhythmic-concerns">Special rhythmic concerns</a>
<hr>
</div>

<h5 class="subsubsection">1.2.6.1 Grace notes</h5>

<p><a name="index-g_t_005cgrace-691"></a><a name="index-g_t_005cgrace-692"></a>
<a name="index-ornaments-693"></a><a name="index-grace-notes-694"></a><a name="index-appoggiatura-695"></a><a name="index-acciaccatura-696"></a>
Grace notes are ornaments that are written out. Grace notes
are printed in a smaller font and take up no logical time
in a measure.

   <blockquote>
<pre class="verbatim">     
     c4 \grace c16 c4
     \grace { c16[ d16] } c2
</pre>
     <p>
 <a href="../4b/lily-14d792be.ly">
  <img align="middle"
    border="0" src="../4b/lily-14d792be.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>Lilypond also supports two special types of grace notes, the
<em>acciaccatura</em>&ndash;an unmeasured grace note indicated by a slurred
small note with a slashed stem&ndash;and the <em>appoggiatura</em>, which
takes a fixed fraction of the main note and appears in small print
without a slash.

   <blockquote>
<pre class="verbatim">     
     \grace c8 b4 
     \acciaccatura d8 c4
     \appoggiatura e8 d4
     \acciaccatura { g16[ f] } e4
</pre>
     <p>
 <a href="../8c/lily-0fdd2a77.ly">
  <img align="middle"
    border="0" src="../8c/lily-0fdd2a77.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>The placement of grace notes is synchronized between different
staves.  In the following example, there are two sixteenth grace
notes for every eighth grace note

   <blockquote>
<pre class="verbatim">     
     &lt;&lt; \new Staff { e2 \grace { c16[ d e f] } e2 }
        \new Staff { c2 \grace { g8[ b] } c2 } >>
</pre>
     <p>
 <a href="../e3/lily-08457982.ly">
  <img align="middle"
    border="0" src="../e3/lily-08457982.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p><a name="index-g_t_005cafterGrace-697"></a><a name="index-g_t_005cafterGrace-698"></a>

   <p><a name="index-grace-notes_002c-following-699"></a>
If you want to end a note with a grace, use the <code>\afterGrace</code>
command.  It takes two arguments: the main note, and the grace
notes following the main note.

   <blockquote>
<pre class="verbatim">     
     c1 \afterGrace d1 { c16[ d] } c1
</pre>
     <p>
 <a href="../28/lily-25625c32.ly">
  <img align="middle"
    border="0" src="../28/lily-25625c32.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>This will put the grace notes after a space lasting 3/4 of the
length of the main note.  The default fraction 3/4 can be changed by
setting <code>afterGraceFraction</code>.  The following example shows
the results from setting the space at the default,  at 15/16, and
finally at 1/2 of the main note.

   <blockquote>
<pre class="verbatim">     
     &lt;&lt;
       \new Staff {
         c1 \afterGrace d1 { c16[ d] } c1
       }
       \new Staff {
         #(define afterGraceFraction (cons 15 16))
         c1 \afterGrace d1 { c16[ d] } c1
       }
       \new Staff {
         #(define afterGraceFraction (cons 1 2))
         c1 \afterGrace d1 { c16[ d] } c1
       }
     >>
</pre>
     <p>
 <a href="../c6/lily-bda27a8f.ly">
  <img align="middle"
    border="0" src="../c6/lily-bda27a8f.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>The space between the main note and the grace note may also be
specified using spacers. The following example places the grace
note after a space lasting 7/8 of the main note.

   <blockquote>
<pre class="verbatim">     
     \new Voice {
       &lt;&lt; { d1^\trill_( }
          { s2 s4. \grace { c16[ d] } } >>
       c1)
     }
</pre>
     <p>
 <a href="../e5/lily-d19003d2.ly">
  <img align="middle"
    border="0" src="../e5/lily-d19003d2.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>A <code>\grace</code> music expression will introduce special
typesetting settings, for example, to produce smaller type, and
set directions.  Hence, when introducing layout tweaks to
override the special settings, they should be placed inside
the grace expression. The overrides should also be reverted
inside the grace expression. Here, the grace note's default stem
direction is overriden and then reverted.

   <blockquote>
<pre class="verbatim">     
     \new Voice {
       \acciaccatura {
         \stemDown
         f16->
         \stemNeutral
       }
       g4 e c2
     }
</pre>
     <p>
 <a href="../bb/lily-524238ea.ly">
  <img align="middle"
    border="0" src="../bb/lily-524238ea.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p><a name="index-stem_002c-with-slash-700"></a>

<p class="noindent">

<h5 class="subsubheading">Selected Snippets</h5>

<p>The slash through the stem found in <em>acciaccatura</em>s can be applied
in other situations:

   <blockquote>
<pre class="verbatim">     
     \relative c'' {
       \override Stem #'stroke-style = #"grace"
       c8( d2) e8( f4)
     }
</pre>
     <p>
 <a href="../cf/lily-06bca15e.ly">
  <img align="middle"
    border="0" src="../cf/lily-06bca15e.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>The layout of grace expressions can be changed throughout the
music using the function <code>add-grace-property</code>.  The following
example undefines the <code>Stem</code> direction for this grace, so
that stems do not always point up.

   <blockquote>
<pre class="verbatim">     
     \relative c'' {
       \new Staff {
         #(add-grace-property 'Voice 'Stem 'direction ly:stem::calc-direction)
         #(remove-grace-property 'Voice 'Stem 'direction)
         \new Voice {
            \acciaccatura { f16 } g4 
            \grace { d16[ e] } f4
            \appoggiatura { a,32[ b c d] } e2
         }
       }
     }
</pre>
     <p>
 <a href="../96/lily-41a243f7.ly">
  <img align="middle"
    border="0" src="../96/lily-41a243f7.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>Another option is to change the variables <code>startGraceMusic</code>,
<code>stopGraceMusic</code>, <code>startAcciaccaturaMusic</code>,
<code>stopAcciaccaturaMusic</code>, <code>startAppoggiaturaMusic</code>,
<code>stopAppoggiaturaMusic</code>.  The default values of these can be
seen in the file <code>ly/grace-init.ly</code>.  By redefining
them other effects may be obtained.

   <p>Grace notes may be forced to align with regular notes
in other staves:

   <blockquote>
<pre class="verbatim">     
     \relative c'' {
       &lt;&lt;
         \override Score.SpacingSpanner #'strict-grace-spacing = ##t
         \new Staff {
           c4
           \afterGrace c4 { c16[ c8 c16] }
           c4 r
         }
         \new Staff {
           c16 c c c c c c c c4 r
         }
       >>
     }
</pre>
     <p>
 <a href="../43/lily-95a39472.ly">
  <img align="middle"
    border="0" src="../43/lily-95a39472.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

<p class="noindent">

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

   <p class="indent">

   <p>Music Glossary:
<a name="index-grace-notes-701"></a><a href="../music-glossary/grace-notes.html#grace-notes">grace notes</a>,
<a name="index-acciaccatura-702"></a><a href="../music-glossary/acciaccatura.html#acciaccatura">acciaccatura</a>,
<a name="index-appoggiatura-703"></a><a href="../music-glossary/appoggiatura.html#appoggiatura">appoggiatura</a>.

   <p>Installed Files: <samp><span class="file">ly/grace-init.ly</span></samp>.

   <p>Snippets: <a href="../../../input/lsr/lilypond-snippets/Rhythms.html#Rhythms">Rhythms</a>.

   <p>Internals Reference: <a name="index-GraceMusic-704"></a><a href="../lilypond-internals/GraceMusic.html#GraceMusic">GraceMusic</a>.

<p class="noindent">

<h5 class="subsubheading">Known issues and warnings</h5>

<p>A multi-note beamed <em>acciaccatura</em> is printed without a slash,
and looks exactly the same as a multi-note beamed
<em>appoggiatura</em>. 
<!-- TODO Add link to LSR snippet to add slash when available -->

   <p>Grace note synchronization can also lead to surprises.  Staff
notation, such as key signatures, bar lines, etc., are also
synchronized.  Take care when you mix staves with grace notes and
staves without, for example,

   <blockquote>
<pre class="verbatim">     
     &lt;&lt; \new Staff { e4 \bar "|:" \grace c16 d2. }
        \new Staff { c4 \bar "|:" d2. } >>
</pre>
     <p>
 <a href="../48/lily-847ae305.ly">
  <img align="middle"
    border="0" src="../48/lily-847ae305.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

<p class="noindent">This can be remedied by inserting grace skips of the corresponding
durations in the other staves.  For the above example

   <blockquote>
<pre class="verbatim">     
     &lt;&lt; \new Staff { e4 \bar "|:" \grace c16 d2. }
        \new Staff { c4 \bar "|:" \grace s16 d2. } >>
</pre>
     <p>
 <a href="../aa/lily-25ae2e96.ly">
  <img align="middle"
    border="0" src="../aa/lily-25ae2e96.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>Grace sections should only be used within sequential music
expressions.  Nesting or juxtaposing grace sections is not
supported, and might produce crashes or other errors.

   <!-- footer_tag --><br><hr>
<div class="node">
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Aligning-to-cadenzas.html#Aligning-to-cadenzas">Aligning to cadenzas</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Special-rhythmic-concerns.html#Special-rhythmic-concerns">Special rhythmic concerns</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="Grace-notes.fr.html">français</a>, <a href="Grace-notes.es.html">español</a>, <a href="Grace-notes.de.html">deutsch</a>.
 <BR>
 
</P>
</BODY></html>