Sophie

Sophie

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

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>Collision resolution - 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="Multiple-voices.html#Multiple-voices" title="Multiple voices">
<link rel="prev" href="Voice-styles.html#Voice-styles" title="Voice styles">
<link rel="next" href="Automatic-part-combining.html#Automatic-part-combining" title="Automatic part combining">
<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="Collision-resolution"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Automatic-part-combining.html#Automatic-part-combining">Automatic part combining</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Voice-styles.html#Voice-styles">Voice styles</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Multiple-voices.html#Multiple-voices">Multiple voices</a>
<hr>
</div>

<h5 class="unnumberedsubsubsec">Collision resolution</h5>

<p><a name="index-merging-notes-1262"></a><a name="index-note-collisions-1263"></a><a name="index-collisions-1264"></a><a name="index-g_t_005cshiftOn-1265"></a><a name="index-g_t_005cshiftOn-1266"></a>
<a name="index-g_t_005cshiftOnn-1267"></a><a name="index-g_t_005cshiftOnn-1268"></a>
<a name="index-g_t_005cshiftOnnn-1269"></a><a name="index-g_t_005cshiftOnnn-1270"></a>
<a name="index-g_t_005cshiftOff-1271"></a><a name="index-g_t_005cshiftOff-1272"></a>
<a name="index-shift-rest_002c-automatic-1273"></a>
Note heads with equal durations are automatically merged, while
note heads with unequal durations are not merged.  Rests opposite
a stem are shifted vertically.

   <blockquote>
<pre class="verbatim">     
     &lt;&lt;
       {
         c8 d e d c d c4
         g'2 fis
       } \\ {
         c2 c8. b16 c4
         e,2 r
       } \\ {
         \oneVoice
         s1
         e8 a b c d2
       }
     >>
</pre>
     <p>
 <a href="../b8/lily-c089b276.ly">
  <img align="middle"
    border="0" src="../b8/lily-c089b276.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>Note heads with different note heads may be merged, with the
exception of half-note heads and quarter-note heads:

   <blockquote>
<pre class="verbatim">     
     &lt;&lt;
       {
         \mergeDifferentlyHeadedOn
         c8 d e d c d c4
         g'2 fis
       } \\ {
         c2 c8. b16 c4
         e,2 r
       } \\ {
         \oneVoice
         s1
         e8 a b c d2
       }
     >>
</pre>
     <p>
 <a href="../cf/lily-4daf1523.ly">
  <img align="middle"
    border="0" src="../cf/lily-4daf1523.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>Note heads with different dots may be merged:

   <blockquote>
<pre class="verbatim">     
     &lt;&lt;
       {
         \mergeDifferentlyHeadedOn
         \mergeDifferentlyDottedOn
         c8 d e d c d c4
         g'2 fis
       } \\ {
         c2 c8. b16 c4
         e,2 r
       } \\ {
         \oneVoice
         s1
         e8 a b c d2
       }
     >>
</pre>
     <p>
 <a href="../a0/lily-0d70efbb.ly">
  <img align="middle"
    border="0" src="../a0/lily-0d70efbb.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p><a name="index-shift-note-1274"></a>
The collision on the second measure happens because
<code>merge-differently-headed</code> cannot successfully complete the
merge when three or more notes line up in the same column &ndash; in
fact, you will obtain a warning for this reason.  To allow the
merge to work properly, apply a <code>\shift</code> to the note that
should not be merged.  Here, <code>\shiftOn</code> is applied to move
the top <code>g</code> out of the column, and
<code>merge-differently-headed</code> works properly.

   <blockquote>
<pre class="verbatim">     
     &lt;&lt;
       {
         \mergeDifferentlyHeadedOn
         \mergeDifferentlyDottedOn
         c8 d e d c d c4
         \shiftOn
         g'2 fis
       } \\ {
         c2 c8. b16 c4
         e,2 r
       } \\ {
         \oneVoice
         s1
         e8 a b c d2
       }
     
     >>
</pre>
     <p>
 <a href="../6a/lily-6090b616.ly">
  <img align="middle"
    border="0" src="../6a/lily-6090b616.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>The <code>\shiftOn</code>, <code>\shiftOnn</code>, and <code>\shiftOnnn</code>
commands specify the degree to which chords of the current voice
should be shifted.  The outer voices (normally: voices one and
two) have <code>\shiftOff</code>, while the inner voices (three and
four) have <code>\shiftOn</code>.  <code>\shiftOnn</code> and
<code>\shiftOnnn</code> define further shift levels.

   <p>Notes are only merged if they have opposing stem directions (i.e., in
<code>Voice</code> 1 and 2).

   <p><a name="index-multiple-voices-1275"></a><a name="index-polyphonic-music-1276"></a><a name="index-shifting-voices-1277"></a>

<h5 class="subsubheading">Predefined commands</h5>

<p><a name="index-g_t_005cmergeDifferentlyDottedOn-1278"></a><a name="index-g_t_005cmergeDifferentlyDottedOn-1279"></a>
<code>\mergeDifferentlyDottedOn</code>,
<a name="index-g_t_005cmergeDifferentlyDottedOff-1280"></a><a name="index-g_t_005cmergeDifferentlyDottedOff-1281"></a>
<code>\mergeDifferentlyDottedOff</code>,
<a name="index-g_t_005cmergeDifferentlyHeadedOn-1282"></a><a name="index-g_t_005cmergeDifferentlyHeadedOn-1283"></a>
<code>\mergeDifferentlyHeadedOn</code>,
<a name="index-g_t_005cmergeDifferentlyHeadedOff-1284"></a><a name="index-g_t_005cmergeDifferentlyHeadedOff-1285"></a>
<code>\mergeDifferentlyHeadedOff</code>.

   <p><a name="index-g_t_005cshiftOn-1286"></a><a name="index-g_t_005cshiftOn-1287"></a>
<code>\shiftOn</code>,
<a name="index-g_t_005cshiftOnn-1288"></a><a name="index-g_t_005cshiftOnn-1289"></a>
<code>\shiftOnn</code>,
<a name="index-g_t_005cshiftOnnn-1290"></a><a name="index-g_t_005cshiftOnnn-1291"></a>
<code>\shiftOnnn</code>,
<a name="index-g_t_005cshiftOff-1292"></a><a name="index-g_t_005cshiftOff-1293"></a>
<code>\shiftOff</code>.

<p class="noindent">

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

<p><em>Additional voices to avoid collisions</em>

   <p>In some instances of complex polyphonic music, additional voices are
necessary to prevent collisions between notes.  If more than four
parallel voices are needed, additional voices can be added by defining
a variable using the Scheme function <code>context-spec-music</code>.

   <blockquote>
<pre class="verbatim">     
     voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice)
     \relative c'' {
       \time 3/4 \key d \minor \partial 2
       &lt;&lt;
         { \voiceOne
           a4. a8
           e'4 e4. e8
           f4 d4. c8
         } \\ {
           \voiceThree
           f,2
           bes4 a2
           a4 s2
         } \\ {
           \voiceFive
           s2
           g4 g2
           f4 f2
         } \\ {
           \voiceTwo
           d2
           d4 cis2
           d4 bes2
         }
       >>
     }
</pre>
     <p>
 <a href="../1c/lily-1a8c4f9e.ly">
  <img align="middle"
    border="0" src="../1c/lily-1a8c4f9e.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p><em>Forcing horizontal shift of notes</em>

   <p>When the typesetting engine cannot cope, the <code>force-hshift</code>
property of the <code>NoteColumn</code> object can be used to override
typesetting decisions. The measure units used here are staff spaces.

   <blockquote>
<pre class="verbatim">     
     \relative c' &lt;&lt;
       {
         &lt;d g>2 &lt;d g>
       }
       \\
       { &lt;b f'>2
         \once \override NoteColumn #'force-hshift = #1.7
         &lt;b f'>2
       }
     >>
</pre>
     <p>
 <a href="../ca/lily-9af05dc8.ly">
  <img align="middle"
    border="0" src="../ca/lily-9af05dc8.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-polyphony-1294"></a><a href="../music-glossary/polyphony.html#polyphony">polyphony</a>.

   <p>Learning Manual:
<a name="index-Multiple-notes-at-once-1295"></a><a href="../lilypond-learning/Multiple-notes-at-once.html#Multiple-notes-at-once">Multiple notes at once</a>,
<a name="index-Voices-contain-music-1296"></a><a href="../lilypond-learning/Voices-contain-music.html#Voices-contain-music">Voices contain music</a>,
<a name="index-Collisions-of-objects-1297"></a><a href="../lilypond-learning/Collisions-of-objects.html#Collisions-of-objects">Collisions of objects</a>.

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

   <p>Internals Reference:
<a name="index-NoteColumn-1298"></a><a href="../lilypond-internals/NoteColumn.html#NoteColumn">NoteColumn</a>,
<a name="index-NoteCollision-1299"></a><a href="../lilypond-internals/NoteCollision.html#NoteCollision">NoteCollision</a>,
<a name="index-RestCollision-1300"></a><a href="../lilypond-internals/RestCollision.html#RestCollision">RestCollision</a>.

<p class="noindent">

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

<p>When using <code>merge-differently-headed</code> with an upstem eighth
or a shorter note, and a downstem half note, the eighth note stem
gets a slightly wrong offset because of the different width of the
half note head symbol.

<!-- investigate! Sometimes it works, sometimes not. -FV -->
   <p>The requirements for successfully merging different note heads that
are at the same time differently dotted are not clear.

   <p>There is no support for chords where the same note occurs with
different accidentals in the same chord.  In this case, it is
recommended to use enharmonic transcription, or to use special
cluster notation (see <a href="Clusters.html#Clusters">Clusters</a>).

   <!-- footer_tag --><br><hr>
<div class="node">
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Automatic-part-combining.html#Automatic-part-combining">Automatic part combining</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Voice-styles.html#Voice-styles">Voice styles</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Multiple-voices.html#Multiple-voices">Multiple voices</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="Collision-resolution.fr.html">français</a>, <a href="Collision-resolution.es.html">español</a>, <a href="Collision-resolution.de.html">deutsch</a>.
 <BR>
 
</P>
</BODY></html>