Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > f07b4b9fcbe6d8ab9260b52d15e551a6 > files > 7208

lilypond-doc-2.12.3-1.fc13.noarch.rpm

<!-- header_tag -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Copyright C 1999-2009 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".

 -->
<!-- Created on December 15, 2009 by texi2html 1.82
texi2html was written by: 
            Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>
-->
<head>
<title>GNU LilyPond Learning Manual: 4.3.2 Size of objects</title>

<meta name="description" content="GNU LilyPond Learning Manual: 4.3.2 Size of objects">
<meta name="keywords" content="GNU LilyPond Learning Manual: 4.3.2 Size of objects">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.82">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.ja.html#Top" rel="start" title="GNU LilyPond &mdash; Learning Manual">
<link href="LilyPond-index.ja.html#LilyPond-index" rel="index" title="D. LilyPond index">
<link href="index_toc.ja.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="index_abt.ja.html#SEC_About" rel="help" title="About This Document">
<link href="Appearance-of-objects.ja.html#Appearance-of-objects" rel="up" title="4.3 Appearance of objects">
<link href="LilyPond-index.ja.html#LilyPond-index" rel="next" title="D. LilyPond index">
<link href="Visibility-and-color-of-objects.ja.html#Visibility-and-color-of-objects" rel="previous" title="4.3.1 Visibility and color of objects">
<link rel="stylesheet" type="text/css" title="Patrick McCarty's design" href="lilypond-mccarty.css">
<link rel="alternate stylesheet" type="text/css" href="lilypond.css" title="Andrew Hawryluk's design">
<link rel="alternate stylesheet" type="text/css" href="lilypond-blue.css" title="Kurt Kroon's blue design">
<!--[if lte IE 7]>
<link href="lilypond-ie-fixes.css" rel="stylesheet" type="text/css">
<![endif]-->


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">


<div id="main">
<a name="Size-of-objects"></a>
<table class="nav_table">
<tr><td valign="middle" align="left" colspan="1">[<a href="Tweaking-output.ja.html#Tweaking-output" title="Beginning of this chapter or previous chapter"> &lt;&lt; Tweaking output&nbsp;</a>]</td><td valign="middle" align="center" colspan="3">[<a href="index.ja.html#Top" title="Cover (top) of document" rel="start">Top</a>][<a href="index_toc.ja.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="LilyPond-index.ja.html#LilyPond-index" title="Index" rel="index">Index</a>][<a href="index_abt.ja.html#SEC_About" title="About (help)" rel="help"> ? </a>]</td><td valign="middle" align="right" colspan="1">[<a href="Working-on-LilyPond-projects.ja.html#Working-on-LilyPond-projects" title="Next chapter">&nbsp;Working on LilyPond projects &gt;&gt; </a>]</td></tr><tr><td valign="middle" align="left" colspan="2">[<a href="Visibility-and-color-of-objects.ja.html#Visibility-and-color-of-objects" title="Previous section in reading order" accesskey="p" rel="previous"> &lt; Visibility and color of objects&nbsp;</a>]</td><td valign="middle" align="center" colspan="1">[<a href="Appearance-of-objects.ja.html#Appearance-of-objects" title="Up section" accesskey="u" rel="up">&nbsp; Up :&nbsp;Appearance of objects&nbsp;</a>]</td><td valign="middle" align="right" colspan="2">[<a href="Length-and-thickness-of-objects.ja.html#Length-and-thickness-of-objects" title="Next section in reading order" accesskey="n" rel="next">&nbsp;Length and thickness of objects &gt; </a>]</td></tr></table>
<a name="Size-of-objects"></a>
<h3 class="subsection">4.3.2 Size of objects</h3>

<a name="index-changing-size-of-objects"></a>
<a name="index-size-of-objects"></a>
<a name="index-objects_002c-size-of"></a>
<a name="index-objects_002c-changing-size-of"></a>

<p>Let us begin by looking again at the earlier example
see <a href="Nesting-music-expressions.ja.html#Nesting-music-expressions">Nesting music expressions</a>) which showed
how to introduce a new temporary staff, as in an <a name="index-ossia-1"></a>
<a href="../music-glossary/ossia.ja.html#ossia">ossia</a>.
</p>
<a name="index-alignAboveContext-property_002c-example"></a>
<a name="index-_005cwith_002c-example"></a>

<blockquote><pre class="verbatim">\new Staff =&quot;main&quot; {
       \relative g' {
         r4 g8 g c4 c8 d |
         e4 r8
         &lt;&lt;
           { f c c }
           \new Staff \with {
             alignAboveContext = #&quot;main&quot; }
           { f8 f c }
         &gt;&gt;
         r4 |
       }
     }
</pre><p>
 <a href="../f7/lily-3b599688.ly">
  <img align="middle"
       border="0"
       src="../f7/lily-3b599688.png"
       alt="[image of music]">
 </a>
</p>
</blockquote>



<p>Ossia are normally written without clef and time signature, and
are usually printed slightly smaller than the main staff.  We
already know now how to remove the clef and time signature &ndash;
we simply set the stencil of each to <code>#f</code>, as follows:
</p>
<a name="index-alignAboveContext-property_002c-example-1"></a>
<a name="index-_005cwith_002c-example-1"></a>
<a name="index-stencil-property_002c-example-3"></a>
<a name="index-Clef_002c-example-of-overriding-1"></a>
<a name="index-TimeSignature_002c-example-of-overriding-3"></a>

<blockquote><pre class="verbatim">\new Staff =&quot;main&quot; {
  \relative g' {
    r4 g8 g c4 c8 d |
    e4 r8
    &lt;&lt;
      { f c c }
      \new Staff \with {
        alignAboveContext = #&quot;main&quot;
      }
      {
        \override Staff.Clef #'stencil = ##f
        \override Staff.TimeSignature #'stencil = ##f
        { f8 f c }
      }
    &gt;&gt;
    r4 |
  }
}
</pre><p>
 <a href="../e9/lily-a0bf21a4.ly">
  <img align="middle"
       border="0"
       src="../e9/lily-a0bf21a4.png"
       alt="[image of music]">
 </a>
</p>
</blockquote>



<p>where the extra pair of braces after the <code>\with</code> clause are
required to ensure the enclosed overrides and music are applied
to the ossia staff.
</p>
<p>But what is the difference between modifying the staff context by
using <code>\with</code> and modifying the stencils of the clef and the
time signature with \override?  The main difference is that
changes made in a <code>\with</code> clause are made at the time the
context is created, and remain in force as the <strong>default</strong>
values for the duration of that context, whereas
<code>\set</code> or <code>\override</code> commands embedded in the
music are dynamic &ndash; they make changes synchronized with
a particular point in the music.  If changes are unset or
reverted using <code>\unset</code> or <code>\revert</code> they return to
their default values, which will be the ones set in the
<code>\with</code> clause, or if none have been set there, the normal
default values.
</p>
<p>Some context properties can be modified only in <code>\with</code> clauses.
These are those properties which cannot sensibly be changed after the
context has been created.  <code>alignAboveContext</code> and its partner,
<code>alignBelowContext</code>, are two such properties &ndash; once the staff
has been created its alignment is decided and it would make no sense
to try to change it later.
</p>
<p>The default values of layout object properties can also be set
in <code>\with</code> clauses.  Simply use the normal <code>\override</code>
command leaving out the context name, since this is unambiguously
defined as the context which the <code>\with</code> clause is modifying.
If fact, an error will be generated if a context is specified
in this location.
</p>
<p>So we could replace the example above with
</p>
<a name="index-alignAboveContext-property_002c-example-2"></a>
<a name="index-_005cwith_002c-example-2"></a>
<a name="index-Clef_002c-example-of-overriding-2"></a>
<a name="index-TimeSignature_002c-example-of-overriding-4"></a>

<blockquote><pre class="verbatim">\new Staff =&quot;main&quot; {
  \relative g' {
    r4 g8 g c4 c8 d |
    e4 r8
    &lt;&lt;
      { f c c }
      \new Staff \with {
        alignAboveContext = #&quot;main&quot;
        % Don't print clefs in this staff
        \override Clef #'stencil = ##f
        % Don't print time signatures in this staff
        \override TimeSignature #'stencil = ##f
      }
        { f8 f c }
    &gt;&gt;
    r4 |
  }
}
</pre><p>
 <a href="../95/lily-b2d26044.ly">
  <img align="middle"
       border="0"
       src="../95/lily-b2d26044.png"
       alt="[image of music]">
 </a>
</p>
</blockquote>



<p>Finally we come to changing the size of layout objects.
</p>
<p>Some layout objects are created as glyphs selected from a typeface
font.  These include note heads, accidentals, markup, clefs, time
signatures, dynamics and lyrics.  Their size is changed by modifying
the <code>font-size</code> property, as we shall shortly see.  Other layout
objects such as slurs and ties &ndash; in general, spanner objects &ndash; are
drawn individually, so there is no <code>font-size</code> associated with
them.  These objects generally derive their size from the objects to
which they are attached, so usually there is no need to change their
size manually.  Still other properties such as the length of stems and
bar lines, thickness of beams and other lines, and the separation of
staff lines all need to be modified in special ways.
</p>
<p>Returning to the ossia example, let us first change the font-size.
We can do this in two ways.  We can either change the size of the
fonts of each object type, like <code>NoteHead</code>s with commands
like
</p>
<blockquote><pre class="example">\override NoteHead #'font-size = #-2
</pre></blockquote>

<p>or we can change the size of all fonts by setting a special
property, <code>fontSize</code>, using <code>\set</code>, or by including
it in a <code>\with</code> clause (but without the <code>\set</code>).
</p>
<blockquote><pre class="example">\set fontSize = #-2
</pre></blockquote>

<p>Both of these statements would cause the font size to be reduced
by 2 steps from its previous value, where each
step reduces or increases the size by approximately 12%.
</p>
<p>Let&rsquo;s try it in our ossia example:
</p>
<a name="index-alignAboveContext-property_002c-example-3"></a>
<a name="index-_005cwith_002c-example-3"></a>
<a name="index-Clef_002c-example-of-overriding-3"></a>
<a name="index-TimeSignature_002c-example-of-overriding-5"></a>
<a name="index-fontSize-property_002c-example"></a>

<blockquote><pre class="verbatim">\new Staff =&quot;main&quot; {
  \relative g' {
    r4 g8 g c4 c8 d |
    e4 r8
    &lt;&lt;
      { f c c }
      \new Staff \with {
        alignAboveContext = #&quot;main&quot;
        \override Clef #'stencil = ##f
        \override TimeSignature #'stencil = ##f
        % Reduce all font sizes by ~24%
        fontSize = #-2
      }
        { f8 f c }
    &gt;&gt;
    r4 |
  }
}
</pre><p>
 <a href="../c3/lily-6370cb6c.ly">
  <img align="middle"
       border="0"
       src="../c3/lily-6370cb6c.png"
       alt="[image of music]">
 </a>
</p>
</blockquote>



<p>This is still not quite right.  The note heads and flags are
smaller, but the stems are too long in proportion and the
staff lines are spaced too widely apart.  These need to be
scaled down in proportion to the font reduction.  The next
sub-section discusses how this is done.
</p>
<hr size="6">
<table class="nav_table">
<tr><td valign="middle" align="left" colspan="1">[<a href="Tweaking-output.ja.html#Tweaking-output" title="Beginning of this chapter or previous chapter"> &lt;&lt; Tweaking output&nbsp;</a>]</td><td valign="middle" align="center" colspan="3">[<a href="index.ja.html#Top" title="Cover (top) of document" rel="start">Top</a>][<a href="index_toc.ja.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="LilyPond-index.ja.html#LilyPond-index" title="Index" rel="index">Index</a>][<a href="index_abt.ja.html#SEC_About" title="About (help)" rel="help"> ? </a>]</td><td valign="middle" align="right" colspan="1">[<a href="Working-on-LilyPond-projects.ja.html#Working-on-LilyPond-projects" title="Next chapter">&nbsp;Working on LilyPond projects &gt;&gt; </a>]</td></tr><tr><td valign="middle" align="left" colspan="2">[<a href="Visibility-and-color-of-objects.ja.html#Visibility-and-color-of-objects" title="Previous section in reading order" accesskey="p" rel="previous"> &lt; Visibility and color of objects&nbsp;</a>]</td><td valign="middle" align="center" colspan="1">[<a href="Appearance-of-objects.ja.html#Appearance-of-objects" title="Up section" accesskey="u" rel="up">&nbsp; Up :&nbsp;Appearance of objects&nbsp;</a>]</td><td valign="middle" align="right" colspan="2">[<a href="Length-and-thickness-of-objects.ja.html#Length-and-thickness-of-objects" title="Next section in reading order" accesskey="n" rel="next">&nbsp;Length and thickness of objects &gt; </a>]</td></tr></table>
<!-- footer_tag -->
<div class="footer">
<p class="footer_version">
This page is for LilyPond-2.12.3 (stable-branch).
</p>
<p class="footer_report">
Your <a href="http://lilypond.org/web/devel/participating/documentation-adding">suggestions for the documentation</a> are welcome, please report errors to our <a href="http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs">bug list</a>.
</p>
</div>


<p id="languages">
 Other languages: <a href="Size-of-objects.fr.html">français</a>, <a href="Size-of-objects.es.html">español</a>, <a href="Size-of-objects.de.html">deutsch</a>.
 <br>
 
</p>

<!-- FOOTER -->

<!-- end div#main here -->
</div>



<div id="tocframe">
<p class="toc_uplink"><a href="../index.ja.html" 
         title="Documentation Index">&lt;&lt; Back to Documentation Index</a></p>
<h4 class="toc_header"> <a href="index.ja.html#Top" title="Start of the manual">Learning Manual</a></h4>
<div class="contents">
<ul class="toc">
  <li><a name="toc-Preface-1" href="Preface.ja.html#Preface">Preface</a>  </li>
  <li><a name="toc-Introduction-1" href="Introduction.ja.html#Introduction">1. Introduction</a>
  <ul class="toc">
    <li><a name="toc-Background-1" href="Background.ja.html#Background">1.1 Background</a>    </li>
    <li><a name="toc-About-the-documentation-1" href="About-the-documentation.ja.html#About-the-documentation">1.2 About the documentation</a>    </li>
  </ul>
  </li>
  <li><a name="toc-Tutorial-1" href="Tutorial.ja.html#Tutorial">2. Tutorial</a>
  <ul class="toc">
    <li><a name="toc-First-steps-1" href="First-steps.ja.html#First-steps">2.1 First steps</a>    </li>
    <li><a name="toc-Single-staff-notation-1" href="Single-staff-notation.ja.html#Single-staff-notation">2.2 Single staff notation</a>    </li>
    <li><a name="toc-Multiple-notes-at-once-1" href="Multiple-notes-at-once.ja.html#Multiple-notes-at-once">2.3 Multiple notes at once</a>    </li>
    <li><a name="toc-Songs-1" href="Songs.ja.html#Songs">2.4 Songs</a>    </li>
    <li><a name="toc-Final-touches-1" href="Final-touches.ja.html#Final-touches">2.5 Final touches</a>    </li>
  </ul>
  </li>
  <li><a name="toc-Fundamental-concepts-1" href="Fundamental-concepts.ja.html#Fundamental-concepts">3. Fundamental concepts</a>
  <ul class="toc">
    <li><a name="toc-How-LilyPond-input-files-work-1" href="How-LilyPond-input-files-work.ja.html#How-LilyPond-input-files-work">3.1 How LilyPond input files work</a>    </li>
    <li><a name="toc-Voices-contain-music-1" href="Voices-contain-music.ja.html#Voices-contain-music">3.2 Voices contain music</a>    </li>
    <li><a name="toc-Contexts-and-engravers-1" href="Contexts-and-engravers.ja.html#Contexts-and-engravers">3.3 Contexts and engravers</a>    </li>
    <li><a name="toc-Extending-the-templates-1" href="Extending-the-templates.ja.html#Extending-the-templates">3.4 Extending the templates</a>    </li>
  </ul>
  </li>
  <li class="toc_current"><a name="toc-Tweaking-output-1" href="Tweaking-output.ja.html#Tweaking-output">4. Tweaking output</a>
  <ul class="toc">
    <li><a name="toc-Tweaking-basics-1" href="Tweaking-basics.ja.html#Tweaking-basics">4.1 Tweaking basics</a>    </li>
    <li><a name="toc-The-Internals-Reference-manual-1" href="The-Internals-Reference-manual.ja.html#The-Internals-Reference-manual">4.2 The Internals Reference manual</a>    </li>
    <li class="toc_current"><a name="toc-Appearance-of-objects-1" href="Appearance-of-objects.ja.html#Appearance-of-objects">4.3 Appearance of objects</a>
    <ul class="toc">
      <li><a name="toc-Visibility-and-color-of-objects-1" href="Visibility-and-color-of-objects.ja.html#Visibility-and-color-of-objects">4.3.1 Visibility and color of objects</a>      </li>
      <li class="toc_current"><a name="toc-Size-of-objects-1" href="Size-of-objects.ja.html#Size-of-objects">4.3.2 Size of objects</a>      </li>
      <li><a name="toc-Length-and-thickness-of-objects-1" href="Length-and-thickness-of-objects.ja.html#Length-and-thickness-of-objects">4.3.3 Length and thickness of objects</a>      </li>
    </ul>
    </li>
    <li><a name="toc-Placement-of-objects-1" href="Placement-of-objects.ja.html#Placement-of-objects">4.4 Placement of objects</a>    </li>
    <li><a name="toc-Collisions-of-objects-1" href="Collisions-of-objects.ja.html#Collisions-of-objects">4.5 Collisions of objects</a>    </li>
    <li><a name="toc-Further-tweaking-1" href="Further-tweaking.ja.html#Further-tweaking">4.6 Further tweaking</a>    </li>
  </ul>
  </li>
  <li><a name="toc-Working-on-LilyPond-projects-1" href="Working-on-LilyPond-projects.ja.html#Working-on-LilyPond-projects">5. Working on LilyPond projects</a>
  <ul class="toc">
    <li><a name="toc-Suggestions-for-writing-LilyPond-input-files-1" href="Suggestions-for-writing-LilyPond-input-files.ja.html#Suggestions-for-writing-LilyPond-input-files">5.1 Suggestions for writing LilyPond input files</a>    </li>
    <li><a name="toc-When-things-don_0027t-work-1" href="When-things-don_0027t-work.ja.html#When-things-don_0027t-work">5.2 When things don&rsquo;t work</a>    </li>
    <li><a name="toc-Scores-and-parts-1" href="Scores-and-parts.ja.html#Scores-and-parts">5.3 Scores and parts</a>    </li>
  </ul>
  </li>
  <li><a name="toc-Templates-1" href="Templates.ja.html#Templates">A. Templates</a>
  <ul class="toc">
    <li><a name="toc-Single-staff-1" href="Single-staff.ja.html#Single-staff">A.1 Single staff</a>    </li>
    <li><a name="toc-Piano-templates-1" href="Piano-templates.ja.html#Piano-templates">A.2 Piano templates</a>    </li>
    <li><a name="toc-String-quartet-2" href="String-quartet.ja.html#String-quartet">A.3 String quartet</a>    </li>
    <li><a name="toc-Vocal-ensembles-1" href="Vocal-ensembles.ja.html#Vocal-ensembles">A.4 Vocal ensembles</a>    </li>
    <li><a name="toc-Ancient-notation-templates-1" href="Ancient-notation-templates.ja.html#Ancient-notation-templates">A.5 Ancient notation templates</a>    </li>
    <li><a name="toc-Jazz-combo-1" href="Jazz-combo.ja.html#Jazz-combo">A.6 Jazz combo</a>    </li>
    <li><a name="toc-lilypond_002dbook-templates-1" href="lilypond_002dbook-templates.ja.html#lilypond_002dbook-templates">A.7 lilypond-book templates</a>    </li>
  </ul>
  </li>
  <li><a name="toc-Scheme-tutorial-1" href="Scheme-tutorial.ja.html#Scheme-tutorial">B. Scheme tutorial</a>
  <ul class="toc">
    <li><a name="toc-Tweaking-with-Scheme-1" href="Tweaking-with-Scheme.ja.html#Tweaking-with-Scheme">B.1 Tweaking with Scheme</a>    </li>
  </ul>
  </li>
  <li><a name="toc-GNU-Free-Documentation-License-1" href="GNU-Free-Documentation-License.ja.html#GNU-Free-Documentation-License">C. GNU Free Documentation License</a>  </li>
  <li><a name="toc-LilyPond-index-1" href="LilyPond-index.ja.html#LilyPond-index">D. LilyPond index</a>  </li>
</ul>
</div>
</div>

</body>
</html>