<!-- 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 par les auteurs The translation of the following copyright notice is provided for courtesy to non-English speakers, but only the notice in English legally counts. La traduction de la notice de droits d'auteur ci-dessous vise à faciliter sa compréhension par le lecteur non anglophone, mais seule la notice en anglais a valeur légale. Vous avez le droit de copier, distribuer et/ou modifier ce document selon les termes de la Licence GNU de documentation libre, version 1.1 ou tout autre version ultérieure publiée par la Free Software Foundation, "sans aucune section invariante". Une copie de la licence est fournie à la section "Licence GNU de documentation libre". 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 le 15 décembre 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 – Manuel d’initiation : 4.3.3 Length and thickness of objects</title> <meta name="description" content="GNU LilyPond – Manuel d'initiation: 4.3.3 Length and thickness of objects"> <meta name="keywords" content="GNU LilyPond – Manuel d'initiation: 4.3.3 Length and thickness 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.fr.html#Top" rel="start" title="GNU LilyPond — Manuel d'initiation"> <link href="LilyPond-index.fr.html#LilyPond-index" rel="index" title="D. LilyPond index"> <link href="index_toc.fr.html#SEC_Contents" rel="contents" title="Table des matières"> <link href="index_abt.fr.html#SEC_About" rel="help" title="A propos de ce document"> <link href="Appearance-of-objects.fr.html#Appearance-of-objects" rel="up" title="4.3 Appearance of objects"> <link href="LilyPond-index.fr.html#LilyPond-index" rel="next" title="D. LilyPond index"> <link href="Size-of-objects.fr.html#Size-of-objects" rel="previous" title="4.3.2 Size 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="fr" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> <div id="main"> <a name="Length-and-thickness-of-objects"></a> <table class="nav_table"> <tr><td valign="middle" align="left" colspan="1">[<a href="Tweaking-output.fr.html#Tweaking-output" title="Début de ce chapitre ou chapitre précédent"> << Tweaking output </a>]</td><td valign="middle" align="center" colspan="3">[<a href="index.fr.html#Top" title="Couverture (top) du document" rel="start">Racine</a>][<a href="index_toc.fr.html#SEC_Contents" title="Table des matières" rel="contents">Table des matières</a>][<a href="LilyPond-index.fr.html#LilyPond-index" title="Index" rel="index">Index</a>][<a href="index_abt.fr.html#SEC_About" title="A propos (page d’aide)" rel="help"><font size="-4"> </font>? </a>]</td><td valign="middle" align="right" colspan="1">[<a href="Working-on-LilyPond-projects.fr.html#Working-on-LilyPond-projects" title="Chapitre suivant"> Working on LilyPond projects >> </a>]</td></tr><tr><td valign="middle" align="left" colspan="2">[<a href="Size-of-objects.fr.html#Size-of-objects" title="Section précédente dans l’ordre de lecture" accesskey="p" rel="previous"> < Size of objects </a>]</td><td valign="middle" align="center" colspan="1">[<a href="Appearance-of-objects.fr.html#Appearance-of-objects" title="Section supérieure" accesskey="u" rel="up"> Plus haut: Appearance of objects </a>]</td><td valign="middle" align="right" colspan="2">[<a href="Placement-of-objects.fr.html#Placement-of-objects" title="Section suivante dans l’ordre de lecture" accesskey="n" rel="next"> Placement of objects > </a>]</td></tr></table> <a name="Length-and-thickness-of-objects"></a> <h3 class="subsection">4.3.3 Length and thickness of objects</h3> <a name="index-distance"></a> <a name="index-epaisseur"></a> <a name="index-longueur"></a> <a name="index-magstep"></a> <a name="index-taille_002c-modification"></a> <a name="index-hampe_002c-modification-de-longueur"></a> <a name="index-ecartement-des-lignes_002c-modification"></a> <p>Dans LilyPond, les écartements et longueurs sont généralement mesurés en « intervalles de lignes » (<em>staff-spaces</em> en anglais), c’est-à-dire l’écartement qui sépare deux lignes adjacentes dans la portée – plus rarement, il est question de demi-intervalles de lignes. Les propriétés d’épaisseur (<code>thickness</code>), quant à elles, sont généralement mesurées en unités d’une propriété interne appelée « épaisseur de ligne » (<code>line-thickness</code>). Par exemple, les lignes de crescendo/decrescendo présentent par défaut une épaisseur de 1 unité de <code>line-thickness</code>, alors que l’épaisseur d’une hampe est de 1,3. Toutefois, certaines propriétés d’épaisseur sont différentes : par exemple, l’épaisseur des ligature se mesure en espaces de portée. </p> <p>Dans ces conditions, comment ajuster les longueurs à la taille des polices de caractères<font size="-4"> </font>? La solution consiste à utiliser une fonction spéciale appelée <code>magstep</code> – pseudo facteur de zoom –, créée précisément dans ce but. Elle comporte un argument, le changement de taille de police (#-2 dans l’exemple précédent), à partir duquel elle applique un facteur de mise à l’échelle qui réduit, ou augmente, les objets en proportion. Voici comment elle s’utilise : </p> <a name="index-alignAboveContext_002c-exemple-de-propriete-4"></a> <a name="index-_005cwith_002c-exemple-4"></a> <a name="index-Clef_002c-exemple-de-derogation-4"></a> <a name="index-TimeSignature_002c-exemple-de-derogation-5"></a> <a name="index-fontSize-_002c-exemple-de-propriete"></a> <a name="index-StaffSymbol_002c-exemple-de-derogation-1"></a> <a name="index-magstep_002c-exemple-d_0027utilisation-de-la-fonction"></a> <a name="index-staff_002dspace_002c-exemple-de-propriete"></a> <a name="index-stencil_002c-exemple-de-propriete-4"></a> <blockquote><pre class="verbatim">\new Staff ="main" { \relative g' { r4 g8 g c4 c8 d | e4 r8 << { f c c } \new Staff \with { alignAboveContext = #"main" \override Clef #'stencil = ##f \override TimeSignature #'stencil = ##f fontSize = #-2 % Reduce stem length and line spacing to match \override StaffSymbol #'staff-space = #(magstep -2) } { f8 f c } >> r4 | } } </pre><p> <a href="../1a/lily-07e6b1dd.ly"> <img align="middle" border="0" src="../1a/lily-07e6b1dd.png" alt="[image of music]"> </a> </p> </blockquote> <p>Puisque la longueur des hampes et plusieurs autres propriétés de longueur sont calculées par rapport à la valeur de la propriété <code>staff-space</code>, elles sont automatiquement mises à l’échelle. Vous remarquerez que cela n’affecte que la dimension verticale de l’ossia – la dimension horizontale étant déterminée par les objets de la portée principale de façon à rester synchronisée vis-à-vis d’elle, elle n’est pas affectée par tous ces changements de taille. Bien sûr, si l’échelle de toute la portée principale était modifiée, tout le placement horizontal s’en trouverait affecté. Il en sera question plus bas dans cette section. </p> <p>Voilà qui complète la création d’une ossia. Les tailles et longueurs de tous les objets peuvent être modifiées de manière analogue. </p> <p>Pour de petits changements d’échelle, comme dans l’exemple ci-dessus, il n’est généralement pas utile d’ajuster l’épaisseur des différentes lignes telles que les barres de mesure, les ligatures, les soufflets de crescendo/decrescendo, les liaisons, etc. Si l’épaisseur d’un objet en particulier doit être ajustée, le mieux est de modifier sa propriété <code>thickness</code>. Nous avons vu plus haut, dans <a href="Properties-of-layout-objects.fr.html#Properties-of-layout-objects">Properties of layout objects</a>, un exemple de modification de l’épaisseur des liaisons. L’épaisseur de tous les objets tracés (c’est-à-dire ceux qui ne proviennent pas d’une police de caractère) peut être changée de la même manière. </p> <hr size="6"> <table class="nav_table"> <tr><td valign="middle" align="left" colspan="1">[<a href="Tweaking-output.fr.html#Tweaking-output" title="Début de ce chapitre ou chapitre précédent"> << Tweaking output </a>]</td><td valign="middle" align="center" colspan="3">[<a href="index.fr.html#Top" title="Couverture (top) du document" rel="start">Racine</a>][<a href="index_toc.fr.html#SEC_Contents" title="Table des matières" rel="contents">Table des matières</a>][<a href="LilyPond-index.fr.html#LilyPond-index" title="Index" rel="index">Index</a>][<a href="index_abt.fr.html#SEC_About" title="A propos (page d’aide)" rel="help"><font size="-4"> </font>? </a>]</td><td valign="middle" align="right" colspan="1">[<a href="Working-on-LilyPond-projects.fr.html#Working-on-LilyPond-projects" title="Chapitre suivant"> Working on LilyPond projects >> </a>]</td></tr><tr><td valign="middle" align="left" colspan="2">[<a href="Size-of-objects.fr.html#Size-of-objects" title="Section précédente dans l’ordre de lecture" accesskey="p" rel="previous"> < Size of objects </a>]</td><td valign="middle" align="center" colspan="1">[<a href="Appearance-of-objects.fr.html#Appearance-of-objects" title="Section supérieure" accesskey="u" rel="up"> Plus haut: Appearance of objects </a>]</td><td valign="middle" align="right" colspan="2">[<a href="Placement-of-objects.fr.html#Placement-of-objects" title="Section suivante dans l’ordre de lecture" accesskey="n" rel="next"> Placement of objects > </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="Length-and-thickness-of-objects.html">English</a>, <a href="Length-and-thickness-of-objects.es.html">español</a>, <a href="Length-and-thickness-of-objects.de.html">deutsch</a>. <br> </p> <!-- FOOTER --> <!-- end div#main here --> </div> <div id="tocframe"> <p class="toc_uplink"><a href="../index.fr.html" title="Documentation Index"><< Retour à l’accueil de la documentation</a></p> <h4 class="toc_header"><a href="index.fr.html#Top" title="Start of the manual">Manuel d’initiation</a></h4> <div class="contents"> <ul class="toc"> <li><a name="toc-Preface-1" href="Preface.fr.html#Preface">Preface</a> </li> <li><a name="toc-Introduction-1" href="Introduction.fr.html#Introduction">1. Introduction</a> <ul class="toc"> <li><a name="toc-Background-1" href="Background.fr.html#Background">1.1 Background</a> </li> <li><a name="toc-About-the-documentation-1" href="About-the-documentation.fr.html#About-the-documentation">1.2 About the documentation</a> </li> </ul> </li> <li><a name="toc-Tutorial-1" href="Tutorial.fr.html#Tutorial">2. Tutorial</a> <ul class="toc"> <li><a name="toc-First-steps-1" href="First-steps.fr.html#First-steps">2.1 First steps</a> </li> <li><a name="toc-Single-staff-notation-1" href="Single-staff-notation.fr.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.fr.html#Multiple-notes-at-once">2.3 Multiple notes at once</a> </li> <li><a name="toc-Songs-1" href="Songs.fr.html#Songs">2.4 Songs</a> </li> <li><a name="toc-Final-touches-1" href="Final-touches.fr.html#Final-touches">2.5 Final touches</a> </li> </ul> </li> <li><a name="toc-Fundamental-concepts-1" href="Fundamental-concepts.fr.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.fr.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.fr.html#Voices-contain-music">3.2 Voices contain music</a> </li> <li><a name="toc-Contexts-and-engravers-1" href="Contexts-and-engravers.fr.html#Contexts-and-engravers">3.3 Contexts and engravers</a> </li> <li><a name="toc-Extending-the-templates-1" href="Extending-the-templates.fr.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.fr.html#Tweaking-output">4. Tweaking output</a> <ul class="toc"> <li><a name="toc-Tweaking-basics-1" href="Tweaking-basics.fr.html#Tweaking-basics">4.1 Tweaking basics</a> </li> <li><a name="toc-The-Internals-Reference-manual-1" href="The-Internals-Reference-manual.fr.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.fr.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.fr.html#Visibility-and-color-of-objects">4.3.1 Visibility and color of objects</a> </li> <li><a name="toc-Size-of-objects-1" href="Size-of-objects.fr.html#Size-of-objects">4.3.2 Size of objects</a> </li> <li class="toc_current"><a name="toc-Length-and-thickness-of-objects-1" href="Length-and-thickness-of-objects.fr.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.fr.html#Placement-of-objects">4.4 Placement of objects</a> </li> <li><a name="toc-Collisions-of-objects-1" href="Collisions-of-objects.fr.html#Collisions-of-objects">4.5 Collisions of objects</a> </li> <li><a name="toc-Further-tweaking-1" href="Further-tweaking.fr.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.fr.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.fr.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.fr.html#When-things-don_0027t-work">5.2 When things don’t work</a> </li> <li><a name="toc-Scores-and-parts-1" href="Scores-and-parts.fr.html#Scores-and-parts">5.3 Scores and parts</a> </li> </ul> </li> <li><a name="toc-Templates-1" href="Templates.fr.html#Templates">A. Templates</a> <ul class="toc"> <li><a name="toc-Single-staff-1" href="Single-staff.fr.html#Single-staff">A.1 Single staff</a> </li> <li><a name="toc-Piano-templates-1" href="Piano-templates.fr.html#Piano-templates">A.2 Piano templates</a> </li> <li><a name="toc-String-quartet-1" href="String-quartet.fr.html#String-quartet">A.3 String quartet</a> </li> <li><a name="toc-Vocal-ensembles-1" href="Vocal-ensembles.fr.html#Vocal-ensembles">A.4 Vocal ensembles</a> </li> <li><a name="toc-Ancient-notation-templates-1" href="Ancient-notation-templates.fr.html#Ancient-notation-templates">A.5 Ancient notation templates</a> </li> <li><a name="toc-Jazz-combo-1" href="Jazz-combo.fr.html#Jazz-combo">A.6 Jazz combo</a> </li> <li><a name="toc-lilypond_002dbook-templates-1" href="lilypond_002dbook-templates.fr.html#lilypond_002dbook-templates">A.7 lilypond-book templates</a> </li> </ul> </li> <li><a name="toc-Scheme-tutorial-1" href="Scheme-tutorial.fr.html#Scheme-tutorial">B. Scheme tutorial</a> <ul class="toc"> <li><a name="toc-Tweaking-with-Scheme-1" href="Tweaking-with-Scheme.fr.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.fr.html#GNU-Free-Documentation-License">C. GNU Free Documentation License</a> </li> <li><a name="toc-LilyPond-index-1" href="LilyPond-index.fr.html#LilyPond-index">D. LilyPond index</a> </li> </ul> </div> </div> </body> </html>