Sophie

Sophie

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

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>Automatic accidentals - 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.de.html#Top">
<link rel="up" href="Displaying-pitches.de.html#Displaying-pitches" title="Displaying pitches">
<link rel="prev" href="Instrument-transpositions.de.html#Instrument-transpositions" title="Instrument transpositions">
<link rel="next" href="Ambitus.de.html#Ambitus" title="Ambitus">
<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="Automatic-accidentals"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Ambitus.de.html#Ambitus">Ambitus</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Instrument-transpositions.de.html#Instrument-transpositions">Instrument transpositions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Displaying-pitches.de.html#Displaying-pitches">Displaying pitches</a>
<hr>
</div>

<h5 class="unnumberedsubsubsec">Automatic accidentals</h5>

<p><a name="index-accidental-style-217"></a><a name="index-accidental-style_002c-default-218"></a><a name="index-accidentals-219"></a><a name="index-accidentals_002c-automatic-220"></a><a name="index-automatic-accidentals-221"></a><a name="index-default-accidental-style-222"></a><a name="index-set_002daccidental_002dstyle-223"></a><a name="index-set_002daccidental_002dstyle-224"></a>
<a name="index-voice-225"></a><a name="index-voice-226"></a>

   <p>There are many different conventions on how to typeset
accidentals.  LilyPond provides a function to specify which
accidental style to use.  This function is called as follows:

<pre class="example">\new Staff &lt;&lt;
  #(set-accidental-style 'voice)
  { ... }
&gt;&gt;
</pre>
   <p>The accidental style applies to the current <code>Staff</code> by
default (with the exception of the styles <code>piano</code> and
<code>piano-cautionary</code>, which are explained below).  Optionally,
the function can take a second argument that determines in which
scope the style should be changed.  For example, to use the same
style in all staves of the current <code>StaffGroup</code>, use:

<pre class="example">#(set-accidental-style 'voice 'StaffGroup)
</pre>
   <p>The following accidental styles are supported.  To demonstrate
each style, we use the following example:

   <p><a name="index-default-227"></a><a name="index-default-228"></a>

   <blockquote>
<pre class="verbatim">     
     musicA = {
       &lt;&lt;
         \relative c' {
           cis'8 fis, d'4 &lt;a cis>8 f bis4 |
           cis2. &lt;c, g'>4 |
         }
         \\
         \relative c' {
           ais'2 cis, |
           fis8 b a4 cis2 |
         }
       >>
     }
     
     musicB = {
       \clef bass
       \new Voice {
         \voiceTwo \relative c' {
           &lt;fis, a cis>4
           \change Staff = up
           cis'
           \change Staff = down
           &lt;fis, a>
           \change Staff = up
           dis' |
           \change Staff = down
           &lt;fis, a cis>4 gis &lt;f a d>2 |
         }
       }
     }
     
     \new PianoStaff {
       &lt;&lt;
         \context Staff = "up" {
           #(set-accidental-style 'default)
           \musicA
         }
         \context Staff = "down" {
           #(set-accidental-style 'default)
           \musicB
         }
       >>
     }
</pre>
     <p>
 <a href="../b7/lily-7a25d23e.ly">
  <img align="middle"
    border="0" src="../b7/lily-7a25d23e.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>Note that the last lines of this example can be replaced by the
following, as long as the same accidental style should be used in
both staves.

<pre class="example">\new PianoStaff {
  &lt;&lt;
    \context Staff = "up" {
      %%% change the next line as desired:
      #(set-accidental-style 'default 'Score)
      \musicA
    }
    \context Staff = "down" {
      \musicB
    }
  &gt;&gt;
}
</pre>
   <!-- don't use verbatim in this table. -->
     <dl>
<dt><code>default</code><dd>
<a name="index-default-accidental-style-229"></a><a name="index-accidental-style_002c-default-230"></a><a name="index-default-231"></a><a name="index-default-232"></a>

     <p>This is the default typesetting behavior.  It corresponds to
eighteenth-century common practice: accidentals are remembered to
the end of the measure in which they occur and only in their own
octave.  Thus, in the example below, no natural signs are printed
before the&nbsp;<code>b</code> in the second measure or the
last&nbsp;<code>c</code>:

     <blockquote>
          <p>
 <a href="../6e/lily-55aca4fa.ly">
  <img align="middle"
    border="0" src="../6e/lily-55aca4fa.png" alt="[image of music]">
 </a>
</p>

     </blockquote>

     <br><dt><code>voice</code><dd>
<a name="index-accidental-style_002c-voice-233"></a><a name="index-voice-accidental-style-234"></a><a name="index-accidental-style_002c-modern-235"></a><a name="index-modern-accidental-style-236"></a><a name="index-accidental-style_002c-modern_002dcautionary-237"></a><a name="index-modern_002dcautionary-accidental-style-238"></a><a name="index-voice-239"></a><a name="index-voice-240"></a>

     <p>The normal behavior is to remember the accidentals at
<code>Staff</code>-level.  In this style, however, accidentals are
typeset individually for each voice.  Apart from that, the rule is
similar to <code>default</code>.

     <p>As a result, accidentals from one voice do not get canceled in
other voices, which is often an unwanted result: in the following
example, it is hard to determine whether the second&nbsp;<code>a</code>
should be played natural or sharp.  The <code>voice</code> option should
therefore be used only if the voices are to be read solely by
individual musicians.  If the staff is to be used by one musician
(e.g., a conductor or in a piano score) then <code>modern</code> or
<code>modern-cautionary</code> should be used instead.

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

     </blockquote>

     <br><dt><code>modern</code><dd>
<a name="index-accidentals_002c-modern-style-241"></a><a name="index-modern-style-accidentals-242"></a><a name="index-modern-243"></a><a name="index-modern-244"></a>

     <p>This rule corresponds to the common practice in the twentieth
century.  It prints the same accidentals as <code>default</code>, with
two exceptions that serve to avoid ambiguity: after temporary
accidentals, cancellation marks are printed also in the following
measure (for notes in the same octave) and, in the same measure,
for notes in other octaves.  Hence the naturals before
the&nbsp;<code>b</code> and the&nbsp;<code>c</code> in the second measure of
the upper staff:

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

     </blockquote>

     <br><dt><code>modern-cautionary</code><dd>
<a name="index-accidentals_002c-modern-cautionary-style-245"></a><a name="index-modern-accidental-style-246"></a><a name="index-modern-cautionary-accidental-style-247"></a><a name="index-modern-style-accidentals-248"></a><a name="index-modern-style-cautionary-accidentals-249"></a><a name="index-modern_002dcautionary-250"></a><a name="index-modern_002dcautionary-251"></a>

     <p>This rule is similar to <code>modern</code>, but the &lsquo;extra&rsquo;
accidentals (the ones not typeset by <code>default</code>) are typeset
as cautionary accidentals.  They are by default printed with
parentheses, but they can also be printed in reduced size by
defining the <code>cautionary-style</code> property of
<code>AccidentalSuggestion</code>.

     <blockquote>
          <p>
 <a href="../80/lily-069abc24.ly">
  <img align="middle"
    border="0" src="../80/lily-069abc24.png" alt="[image of music]">
 </a>
</p>

     </blockquote>

     <br><dt><code>modern-voice</code><dd>
<a name="index-accidental-style_002c-modern-252"></a><a name="index-accidentals_002c-modern-253"></a><a name="index-accidentals_002c-multivoice-254"></a><a name="index-modern-accidental-style-255"></a><a name="index-modern-accidentals-256"></a><a name="index-multivoice-accidentals-257"></a><a name="index-modern_002dvoice-258"></a><a name="index-modern_002dvoice-259"></a>

     <p>This rule is used for multivoice accidentals to be read both by
musicians playing one voice and musicians playing all voices. 
Accidentals are typeset for each voice, but they <em>are</em>
canceled across voices in the same <code>Staff</code>.  Hence,
the&nbsp;<code>a</code> in the last measure is canceled because the
previous cancellation was in a different voice, and
the&nbsp;<code>d</code> in the lower staff is canceled because of the
accidental in a different voice in the previous measure:

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

     </blockquote>

     <p><a name="index-accidental-style_002c-cautionary_002c-modern-voice-260"></a><a name="index-accidental-style_002c-modern-voice-cautionary-261"></a><a name="index-accidental-style_002c-voice_002c-modern-cautionary-262"></a><a name="index-modern_002dvoice_002dcautionary-263"></a><a name="index-modern_002dvoice_002dcautionary-264"></a>

     <br><dt><code>modern-voice-cautionary</code><dd>
This rule is the same as <code>modern-voice</code>, but with the extra
accidentals (the ones not typeset by <code>voice</code>) typeset as
cautionaries.  Even though all accidentals typeset by
<code>default</code> <em>are</em> typeset with this rule, some of them are
typeset as cautionaries.

     <blockquote>
          <p>
 <a href="../dc/lily-58402b6d.ly">
  <img align="middle"
    border="0" src="../dc/lily-58402b6d.png" alt="[image of music]">
 </a>
</p>

     </blockquote>

     <br><dt><code>piano</code><dd>
<a name="index-accidental-style_002c-piano-265"></a><a name="index-accidentals_002c-piano-266"></a><a name="index-piano-accidental-style-267"></a><a name="index-piano-accidentals-268"></a><a name="index-piano-269"></a><a name="index-piano-270"></a>

     <p>This rule reflects twentieth-century practice for piano notation. 
Its behavior is very similar to <code>modern</code> style, but here
accidentals also get canceled across the staves in the same
<code>GrandStaff</code> or <code>PianoStaff</code>, hence all the
cancellations of the final notes.

     <p>This accidental style applies to the current <code>GrandStaff</code> or
<code>PianoStaff</code> by default.

     <blockquote>
          <p>
 <a href="../ce/lily-06d82777.ly">
  <img align="middle"
    border="0" src="../ce/lily-06d82777.png" alt="[image of music]">
 </a>
</p>

     </blockquote>

     <br><dt><code>piano-cautionary</code><dd>
<a name="index-piano_002dcautionary-271"></a><a name="index-piano_002dcautionary-272"></a>
<a name="index-accidentals_002c-piano-cautionary-273"></a><a name="index-cautionary-accidentals_002c-piano-274"></a><a name="index-piano-cautionary-accidentals-275"></a><a name="index-accidental-style_002c-piano-cautionary-276"></a><a name="index-cautionary-accidental-style_002c-piano-277"></a><a name="index-piano-cautionary-accidental-style-278"></a>
This is the same as <code>piano</code> but with the extra accidentals
typeset as cautionaries.

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

     </blockquote>

     <br><dt><code>no-reset</code><dd>
<a name="index-no_002dreset-279"></a><a name="index-no_002dreset-280"></a>
<a name="index-accidental-style_002c-no-reset-281"></a><a name="index-no-reset-accidental-style-282"></a>
This is the same as <code>default</code> but with accidentals lasting
&lsquo;forever&rsquo; and not only within the same measure:

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

     </blockquote>

     <br><dt><code>forget</code><dd>
<a name="index-forget-283"></a><a name="index-forget-284"></a>
<a name="index-forget-accidental-style-285"></a><a name="index-accidental-style_002c-forget-286"></a>
This is the opposite of <code>no-reset</code>: Accidentals are not
remembered at all &ndash; and hence all accidentals are typeset
relative to the key signature, regardless of what came before in
the music:

     <blockquote>
          <p>
 <a href="../8d/lily-0ba6619c.ly">
  <img align="middle"
    border="0" src="../8d/lily-0ba6619c.png" alt="[image of music]">
 </a>
</p>

     </blockquote>

   </dl>

<p class="noindent">

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

<p><em>Dodecaphonic-style accidentals for each note including naturals</em>

   <p>In early 20th century works, starting with Schoenberg, Berg and Webern
(the "Second" Viennese school), every pitch in the twelve-tone scale
has to be regarded as equal, without any hierarchy such as the
classical (tonal) degrees. Therefore, these composers print one
accidental for each note, even at natural pitches, to emphasize their
new approach to music theory and language.

   <p>This snippet shows how to achieve such notation rules.

   <blockquote>
<pre class="verbatim">     
     webernAccidentals = {
       % the 5s are just "a value different from any accidental"
       \set Staff.keySignature = #'((0 . 5) (1 . 5) (2 . 5) (3 . 5)
                                    (4 . 5) (5 . 5) (6 . 5))
       \set Staff.extraNatural = ##f
       #(set-accidental-style 'forget)
     }
     
     \score {
       {
         \webernAccidentals
         c'4 dis' cis' cis'
         c'4 dis' cis' cis'
         c'4 c' dis' des'
       }
       \layout {
         \context {
         \Staff
         \remove "Key_engraver"
         }
       }
     }
</pre>
     <p>
 <a href="../b1/lily-e2910e64.ly">
  <img align="middle"
    border="0" src="../b1/lily-e2910e64.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

<p class="noindent">

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

   <p class="indent">

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

   <p>Internals Reference:
<a name="index-Accidental-287"></a><a href="../lilypond-internals/Accidental.de.html#Accidental">Accidental</a>,
<a name="index-Accidental_005fengraver-288"></a><a href="../lilypond-internals/Accidental_005fengraver.de.html#Accidental_005fengraver">Accidental_engraver</a>,
<a name="index-GrandStaff-289"></a><a href="../lilypond-internals/GrandStaff.de.html#GrandStaff">GrandStaff</a> and
<a name="index-PianoStaff-290"></a><a href="../lilypond-internals/PianoStaff.de.html#PianoStaff">PianoStaff</a>,
<a name="index-Staff-291"></a><a href="../lilypond-internals/Staff.de.html#Staff">Staff</a>,
<a name="index-AccidentalSuggestion-292"></a><a href="../lilypond-internals/AccidentalSuggestion.de.html#AccidentalSuggestion">AccidentalSuggestion</a>,
<a name="index-AccidentalPlacement-293"></a><a href="../lilypond-internals/AccidentalPlacement.de.html#AccidentalPlacement">AccidentalPlacement</a>,
<a name="index-accidental_002dsuggestion_002dinterface-294"></a><a href="../lilypond-internals/accidental_002dsuggestion_002dinterface.de.html#accidental_002dsuggestion_002dinterface">accidental-suggestion-interface</a>.

   <p><a name="index-accidentals-and-simultaneous-notes-295"></a><a name="index-simultaneous-notes-and-accidentals-296"></a><a name="index-accidentals-in-chords-297"></a><a name="index-chords_002c-accidentals-in-298"></a>

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

<p>Simultaneous notes are considered to be entered in sequential
mode.  This means that in a chord the accidentals are typeset as
if the notes in the chord happen one at a time, in the order in
which they appear in the input file.  This is a problem when
accidentals in a chord depend on each other, which does not happen
for the default accidental style.  The problem can be solved by
manually inserting&nbsp;<code>!</code> and&nbsp;<code>?</code> for the
problematic notes.

   <!-- footer_tag --><br><hr>
<div class="node">
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Ambitus.de.html#Ambitus">Ambitus</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Instrument-transpositions.de.html#Instrument-transpositions">Instrument transpositions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Displaying-pitches.de.html#Displaying-pitches">Displaying pitches</a>
</div>

<div style="background-color: #e8ffe8; padding: 2; border: #c0ffc0 1px solid;">
<p>
<font size="-1">
Diese Seite ist für LilyPond-2.11.57 (Entwicklungszweig).
<br>
<address>
Fehler bitte an <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> melden. </address>
<br>
Ihre <a href="http://lilypond.org/web/devel/participating/documentation-adding">Vorschläge für die Dokumentation</a> sind willkommen.
</font>
</p>
</div>


<P>
 Andere Sprachen: <a href="Automatic-accidentals.fr.html">français</a>, <a href="Automatic-accidentals.es.html">español</a>.
 <BR>
 
</P>
</BODY></html>