Sophie

Sophie

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

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>Proportional notation - 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.es.html#Top">
<link rel="up" href="Horizontal-spacing.es.html#Horizontal-spacing" title="Horizontal spacing">
<link rel="prev" href="Line-length.es.html#Line-length" title="Line length">
<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="Proportional-notation"></a>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Line-length.es.html#Line-length">Line length</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Horizontal-spacing.es.html#Horizontal-spacing">Horizontal spacing</a>
<hr>
</div>

<h4 class="subsection">4.5.5 Proportional notation</h4>

<p>LilyPond supports proportional notation, a type of horizontal spacing
in which each note consumes an amount of horizontal space exactly
equivalent to its rhythmic duration.  This type of proportional spacing
is comparable to horizontal spacing on top of graph paper.  Some late
20th- and early 21st-century scores use proportional notation to
clarify complex rhythmic relationships or to facilitate the placement
of timelines or other graphics directly in the score.

   <p>LilyPond supports five different settings for proportional notation,
which may be used together or alone:

     <ul>
<li><code>proportionalNotationDuration</code>
<li><code>uniform-stretching</code>
<li><code>strict-note-spacing</code>
<li><code>\remove Separating_line_group_engraver</code>
<li><code>\override PaperColumn #'used = ##t</code>
</ul>

   <p>In the examples that follow, we explore these five different
proportional notation settings and examine how these settings interact.

   <p>We start with the following one-measure example, which uses classical
spacing with ragged-right turned on.

   <blockquote>
<pre class="verbatim">     
     \new Score &lt;&lt;
       \new RhythmicStaff {
         c'2
         c'16 c'16 c'16 c'16
         \times 4/5 {
           c'16 c'16 c'16 c'16 c'16
         }
       }
     >>
</pre>
     <p>
 <a href="../10/lily-1ff1bc28.ly">
  <img align="middle"
    border="0" src="../10/lily-1ff1bc28.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>Notice that the half note which begins the measure takes up far less
than half of the horizontal space of the measure.  Likewise, the
sixteenth notes and sixteenth-note quintuplets (or twentieth notes)
which end the measure together take up far more than half the
horizontal space of the measure.

   <p>In classical engraving, this spacing may be exactly what we want
because we can borrow horizontal space from the half note and conserve
horizontal space across the measure as a whole.

   <p>On the other hand, if we want to insert a measured timeline or other
graphic above or below our score, we need proportional notation.  We
turn proportional notation on with the proportionalNotationDuration
setting.

   <blockquote>
<pre class="verbatim">     
     \new Score \with {
       proportionalNotationDuration = #(ly:make-moment 1 20)
     } &lt;&lt;
       \new RhythmicStaff {
         c'2
         c'16 c'16 c'16 c'16
         \times 4/5 {
           c'16 c'16 c'16 c'16 c'16
         }
       }
     >>
</pre>
     <p>
 <a href="../f5/lily-0ae38108.ly">
  <img align="middle"
    border="0" src="../f5/lily-0ae38108.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>The half note at the beginning of the measure and the faster notes in
the second half of the measure now occupy equal amounts of horizontal
space.  We could place a measured timeline or graphic above or below
this example.

   <p>The <code>proportionalNotationDuration</code> setting is a context setting that
lives in <code>Score</code>.  Recall that context settings appear in one of
three locations in our input file &ndash; in a <code>\with</code> block, in a
<code>\context</code> block, or directly in music entry
preceded by the <code>\set</code> command.  As with all
context settings, users can pick which of the three different
locations they would like to set <code>proportionalNotationDuration</code>.

   <p>The <code>proportionalNotationDuration</code> setting takes a single argument,
which is the reference duration against which all music will be
spaced.  The LilyPond Scheme function make-moment takes two arguments
&ndash; a numerator and denominator which together express some fraction of
a whole note.  The call <code>#(ly:make-moment 1 20)</code> therefore produces a
reference duration of a twentieth note.  The values
<code>#(ly:make-moment 1 16)</code>, <code>#(ly:make-moment 1 8)</code>, and
<code>#(ly:make-moment 3 97)</code> are all possible as well.

   <p>How do we select the right reference duration to pass to
<code>proportionalNotationDuration</code>?  Usually by a process of trial and error,
beginning with a duration close to the fastest (or smallest) duration
in the piece.  Smaller reference durations space music loosely; larger
reference durations space music tightly.

   <blockquote>
<pre class="verbatim">     
     \new Score \with {
       proportionalNotationDuration = #(ly:make-moment 1 8)
     } &lt;&lt;
       \new RhythmicStaff {
         c'2
         c'16 c'16 c'16 c'16
         \times 4/5 {
           c'16 c'16 c'16 c'16 c'16
         }
       }
     >>
     
     \new Score \with {
       proportionalNotationDuration = #(ly:make-moment 1 16)
     } &lt;&lt;
       \new RhythmicStaff {
         c'2
         c'16 c'16 c'16 c'16
         \times 4/5 {
           c'16 c'16 c'16 c'16 c'16
         }
       }
     >>
     
     \new Score \with {
       proportionalNotationDuration = #(ly:make-moment 1 32)
     } &lt;&lt;
       \new RhythmicStaff {
         c'2
         c'16 c'16 c'16 c'16
         \times 4/5 {
           c'16 c'16 c'16 c'16 c'16
         }
       }
     >>
</pre>
     <p>
 <a href="../48/lily-d80870e5.ly">
  <img align="middle"
    border="0" src="../48/lily-d80870e5.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>Note that too large a reference duration &ndash; such as the eighth note,
above &ndash; spaces music too tightly and can cause note head collisions. 
Note also that proportional notation in general takes up more
horizontal space that does classical spacing.  Proportional spacing
provides rhythmic clarity at the expense of horizontal space.

   <p>Next we examine how to optimally space overlapping tuplets.

   <p>We start by examining what happens to our original example, with
classical spacing, when we add a second staff with a different type of
tuplet.

   <blockquote>
<pre class="verbatim">     
     \new Score &lt;&lt;
       \new RhythmicStaff {
         c'2
         c'16 c'16 c'16 c'16
         \times 4/5 {
           c'16 c'16 c'16 c'16 c'16
         }
       }
       \new RhythmicStaff {
         \times 8/9 {
           c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8
         }
       }
     >>
</pre>
     <p>
 <a href="../ad/lily-db7b4fcc.ly">
  <img align="middle"
    border="0" src="../ad/lily-db7b4fcc.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>The spacing is bad because the evenly notes of the bottom staff do not
stretch uniformly.  Classical engraving includes very few complex
triplets and so classical engraving rules can generate this type of
result.  Setting <code>proportionalNotationDuration</code> remedies this
situation considerably.

   <blockquote>
<pre class="verbatim">     
     \new Score \with {
       proportionalNotationDuration = #(ly:make-moment 1 20)
     } &lt;&lt;
       \new RhythmicStaff {
         c'2
         c'16 c'16 c'16 c'16
         \times 4/5 {
           c'16 c'16 c'16 c'16 c'16
         }
       }
       \new RhythmicStaff {
         \times 8/9 {
           c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8
         }
       }
     >>
</pre>
     <p>
 <a href="../e3/lily-5ef7b90e.ly">
  <img align="middle"
    border="0" src="../e3/lily-5ef7b90e.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>But if we look very carefully we can see that notes of the second half
of the 9-tuplet space ever so slightly more widely than do the notes
of the first half of the 9-tuplet.  To ensure uniform stretching, we
turn on <code>uniform-stretching</code>, which is a property of
<code>SpacingSpanner</code>.

   <blockquote>
<pre class="verbatim">     
     \new Score \with {
       proportionalNotationDuration = #(ly:make-moment 1 20)
       \override SpacingSpanner #'uniform-stretching = ##t
     } &lt;&lt;
       \new RhythmicStaff {
         c'2
         c'16 c'16 c'16 c'16
         \times 4/5 {
           c'16 c'16 c'16 c'16 c'16
         }
       }
       \new RhythmicStaff {
         \times 8/9 {
           c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8
         }
       }
     >>
</pre>
     <p>
 <a href="../4a/lily-57130c71.ly">
  <img align="middle"
    border="0" src="../4a/lily-57130c71.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>Our two-staff example now spaces exactly, our rhythmic
relationships are visually clear, and we can include a measured
timeline or graphic if we want.

   <p>Note that the LilyPond's proportional notation package expects
that all proportional scores set the SpacingSpanner's
'uniform-stretching attribute to ##t. Setting
proportionalNotationDuration without also setting the
SpacingSpanner's 'uniform-stretching attribute to ##t will, for
example, cause Skips to consume an incorrect amount of horizontal
space.

   <p>The SpacingSpanner is an abstract grob that lives in the Score
context. As with our settings of proportionalNotationDuration,
overrides to the SpacingSpanner can occur in any of three
different places in our input file – in the Score \with block, in
a Score \context block, or in note entry directly.

   <p>There is by default only one <code>SpacingSpanner</code> per <code>Score</code>.  This
means that, by default, <code>uniform-stretching</code> is either turned on for the
entire score or turned off for the entire score.  We can, however,
override this behavior and turn on different spacing features at
different places in the score.  We do this with the command
<code>\newSpacingSection</code>.  See <a href="New-spacing-area.es.html#New-spacing-area">New spacing area</a>, for more info.

   <p>Next we examine the effects of the <code>Separating_line_group_engraver</code> and
see why proportional scores frequently remove this engraver.  The following
example shows that there is a small amount of &ldquo;preferatory&rdquo; space
just before the first note in each system.

   <blockquote>
<pre class="verbatim">     
     \paper {
       indent = #0
     }
     
     \new Staff {
       c'1
       \break
       c'1
     }
</pre>
     <p>
 <a href="../0d/lily-83ba8a7d.ly">
  <img align="middle"
    border="0" src="../0d/lily-83ba8a7d.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>The amount of this preferatory space is the same whether after a time
signature, a key signature or a clef.  <code>Separating_line_group_engraver</code>
is responsible for this space.  Removing <code>Separating_line_group_engraver</code>
reduces this space to zero.

   <blockquote>
<pre class="verbatim">     
     \paper {
       indent = #0
     }
     
     \new Staff \with {
       \remove Separating_line_group_engraver
     } {
       c'1
       \break
       c'1
     }
</pre>
     <p>
 <a href="../c9/lily-66b6974c.ly">
  <img align="middle"
    border="0" src="../c9/lily-66b6974c.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>Nonmusical elements like time signatures, key signatures, clefs and
accidentals are problematic in proportional notation.  None of these
elements has rhythmic duration.  But all of these elements consume
horizontal space.  Different proportional scores approach these
problems differently.

   <p>It may be possible to avoid spacing problems with key signatures
simply by not having any.  This is a valid option since most
proportional scores are contemporary music.  The same may be true
of time signatures, especially for those scores
that include a measured timeline or other graphic.  But these scores
are exceptional and most proportional scores include at least some
time signatures.  Clefs and accidentals are even more essential.

   <p>So what strategies exist for spacing nonmusical elements in a
proportional context?  One good option is the <code>strict-note-spacing</code>
property of <code>SpacingSpanner</code>.  Compare the two scores below:

   <blockquote>
<pre class="verbatim">     
     \new Staff {
       \set Score.proportionalNotationDuration = #(ly:make-moment 1 16)
       c''8
       c''8
       c''8
       \clef alto
       d'8
       d'2
     }
     
     \new Staff {
       \set Score.proportionalNotationDuration = #(ly:make-moment 1 16)
       \override Score.SpacingSpanner #'strict-note-spacing = ##t
       c''8
       c''8
       c''8
       \clef alto
       d'8
       d'2
     }
</pre>
     <p>
 <a href="../d5/lily-32b30c1d.ly">
  <img align="middle"
    border="0" src="../d5/lily-32b30c1d.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>Both scores are proportional, but the spacing in the first score
is too loose because of the clef change. The spacing of the second
score remains strict, however, because strict-note-spacing is
turned on.  Turning on strict-note-spacing causes the width of
time signatures, key signatures, clefs and accidentals to play no
part in the spacing algorithm.

   <p>In addition to the settings given here, there are other settings
that frequently appear in proportional scores. These include:

     <ul>
<li><code>\override SpacingSpanner #'strict-grace-spacing = ##t</code>
<li><code>tupletFullLength = ##t</code>
<li><code>\override Beam #'breakable = ##t</code>
<li><code>\override Glissando #'breakable = ##t</code>
<li><code>\override TextSpanner #'breakable = ##t</code>
<li><code>\remove Forbid_line_break_engraver in the Voice context</code>
</ul>

   <p>These settings space grace notes strictly, extend tuplet brackets to
mark both rhythmic start- and stop-points, and allow spanning elements
to break across systems and pages.  See the respective parts of the manual
for these related settings.

   <!-- footer_tag --><br><hr>
<div class="node">
<p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Line-length.es.html#Line-length">Line length</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Horizontal-spacing.es.html#Horizontal-spacing">Horizontal spacing</a>
</div>

<div style="background-color: #e8ffe8; padding: 2; border: #c0ffc0 1px solid;">
<p>
<font size="-1">
Esta página corresponde a LilyPond-2.11.57 (rama de desarrollo).
<br>
<address>
Informe de los fallos a través de la lista en español <a href="http://es.groups.yahoo.com/group/lilypond-es/">lilypond-es</a>, o en inglés a través de <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>
Se agradecen las <a href="http://lilypond.org/web/devel/participating/documentation-adding">sugerencias para la documentación</a>.
</font>
</p>
</div>


<P>
 Otros idiomas: <a href="Proportional-notation.fr.html">français</a>.
 <BR>
 
</P>
</BODY></html>