]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' of git://git.sv.gnu.org/lilypond
authorGraham Percival <graham@percival-music.ca>
Sat, 19 Jan 2008 05:41:07 +0000 (21:41 -0800)
committerGraham Percival <graham@percival-music.ca>
Sat, 19 Jan 2008 05:41:07 +0000 (21:41 -0800)
Documentation/user/rhythms.itely
Documentation/user/tweaks.itely
input/manual/editorial-headword.ly
input/manual/expressive-headword.ly
input/manual/pitches-headword.ly
input/manual/repeats-headword.ly
input/manual/rhythms-headword.ly
input/manual/simultaneous-headword.ly
input/manual/staff-headword.ly
input/manual/text-headword.ly

index b5b91a5113c6f73b97dc27d861327a50f03f4cbf..acf7abb48c35e519a6ce99d570a902b5fa4c87da 100644 (file)
@@ -9,7 +9,7 @@
 @node Rhythms
 @section Rhythms
 
-@lilypondfile[ragged-right,line-width=16\cm,staffsize=16,quote]
+@lilypondfile[ragged-right,line-width=16\cm,staffsize=14,quote]
 {rhythms-headword.ly}
 
 This section discusses rhythms, durations, and bars.
index 42a88108d30a4abe5df3da74e63b366dbfbab224..95b865d414a369928653d1492b60ccd0a87f6862 100644 (file)
@@ -710,6 +710,7 @@ appearance of the printed music.
 @menu
 * Visibility and color of objects::  
 * Size of objects::             
+* Length and thickness of objects::  
 @end menu
 
 @node Visibility and color of objects
@@ -1140,13 +1141,31 @@ Let's try it in our ossia example:
 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.
+scaled down in proportion to the font reduction.  The next
+sub-section discusses how this is done.
 
+@node Length and thickness of objects
+@subsection Length and thickness of objects
+
+@cindex Distances
+@cindex Thickness
+@cindex Length
 @cindex magstep
 @cindex size, changing
 @cindex stem length, changing
 @cindex staff line spacing, changing
 
+Distances and lengths in LilyPond are generally measured in
+staff-spaces, the distance between adjacent lines in the staff,
+(or occasionally half staff spaces) while most @code{thickness}
+properties are measured in units of an internal property called
+@code{line-thickness.}  For example, by default, the lines of
+hairpins are given a thickness of 1 unit of @code{line-thickness},
+while the @code{thickness} of a note stem is 1.3.  Note, though,
+that some thickness properties are different; for example, the
+thickness of beams is measured in staff-spaces.
+
+So how are lengths to be scaled in proportion to the font size?
 This can be done with the help of a special function called
 @code{magstep} provided for exactly this purpose.  It takes
 one argument, the change in font size (#-2 in the example above)
@@ -1165,7 +1184,7 @@ objects in proportion.  It is used like this:
         \override Clef #'stencil = ##f
         \override TimeSignature #'stencil = ##f
         fontSize = #-2
-        % Reduce stems and line spacing to match
+        % Reduce stem length and line spacing to match
         \override StaffSymbol #'staff-space = #(magstep -2)
       }
         { f8 f c }
@@ -1180,15 +1199,26 @@ Since the length of stems and many other length-related properties
 are always calculated relative to the
 value of the @code{staff-space} property these are automatically
 scaled down in length too.  Note that this affects only the
-vertical scale of the ossia -- the horizontal scale is determined 
+vertical scale of the ossia -- the horizontal scale is determined
 by the layout of the main music in order to remain synchronised 
 with it, so it is not affected by any of these changes in size.
 Of course, if the scale of all the main music were changed in this
 way then the horizontal spacing would be affected.  This is 
 discussed later in the layout section.
 
-This, then, completes the creation of an ossia.  The sizes of all
-other objects may be modified in analogous ways.
+This, then, completes the creation of an ossia.  The sizes and
+lengths of all other objects may be modified in analogous ways.
+
+For small changes in scale, as in the example above, the
+thickness of the various drawn lines such as bar lines,
+beams, hairpins, slurs, etc does not usually require global 
+adjustment.  If the thickness of any particular layout object
+needs to be adjusted this can be best achieved by overriding its
+@code{thickness} property.  An example of changing the thickness
+of slurs was shown above in @ref{Properties of layout objects}.
+The thickness of all drawn objects (i.e., those not produced
+from a font) may be changed in the same way. 
+
 
 @node Placement of objects
 @section Placement of objects
@@ -1213,7 +1243,7 @@ Within-staff objects are those that are located on the staff
 these are usually fixed by the music itself -- they are
 vertically positioned on specific lines of the staff or are 
 tied to other objects that are so positioned.  Collisions of
- note heads, stems and accidentals in closely set chords are
+note heads, stems and accidentals in closely set chords are
 normally avoided automatically.  There are commands and
 overrides which can modify this automatic behaviour, as we
 shall shortly see.
@@ -1480,29 +1510,23 @@ try @code{-7}:
 @subsection Outside staff objects
 
 Outside-staff objects are automatically placed to avoid collisions.
-Objects with the lower value of @code{outside-staff-priority}
+Objects with the lower value of the @code{outside-staff-priority}
 property are placed nearer to the staff, and other outside-staff
 objects are then raised as far as necessary to avoid collisions.
 The @code{outside-staff-priority} is defined in the
 @code{grob-interface} and so is a property of all layout objects.
-It is set to @code{#f} (the default) for all within-staff objects,
-and is set explicitly to the default numerical value appropriate
-to the each object as it is created.  The following table shows
+By default it is set to @code{#f} for all within-staff objects,
+and to a numerical value appropriate to each outside-staff object
+when the object is created.  The following table shows
 the default numerical values for some of the commonest
-outside-staff objects.  Others may be found in the object
-properties listed in the IR.
-
-TODO Distinguish between Staff and Score objects when it
-is clear how to do this
+outside-staff objects which are, by default, placed in the
+@code{Staff} Context.
 
 @multitable @columnfractions .3 .3
 @headitem Layout Object           @tab Priority
-@item @code{BarNumber}            @tab @code{ 100}
 @item @code{DynamicLineSpanner}   @tab @code{ 250}
 @item @code{DynamicText}          @tab @code{ 250}
-@item @code{MetronomeMark}        @tab @code{1000}
 @item @code{OttavaBracket}        @tab @code{ 400}
-@item @code{RehearsalMark}        @tab @code{1500}
 @item @code{TextScript}           @tab @code{ 450}
 @item @code{TextSpanner}          @tab @code{ 350}
 @end multitable
@@ -1510,6 +1534,8 @@ is clear how to do this
 Here is an example showing the default placement of these.
 
 @cindex text spanner
+@funindex \startTextSpan
+@funindex \stopTextSpan
 @cindex ottava bracket
 
 @lilypond[quote,fragment,ragged-right,verbatim,relative=1]
@@ -1525,8 +1551,6 @@ c' \startTextSpan
 c\pp
 % Add Dynamic Line Spanner
 c\<
-% Add Metronome Mark
-\tempo 4 = 72
 % Add Text Script
 c^Text
 c c
@@ -1537,7 +1561,7 @@ c\ff c \stopTextSpan
 c, c c c
 @end lilypond
 
-This example also shows how to create Text Spanners -- 
+This example also shows how to create Text Spanners --
 text with extender lines above a section of music.  The
 spanner extends from the @code{\startTextSpan} command to
 the @code{\stopTextSpan} command, and the format of the
@@ -1546,24 +1570,66 @@ For more details see @ruser{Text spanners}.
 
 It also shows how ottava brackets are created.
 
-Note that bar numbers and rehearsal marks are not shown.  
-By default these are created in the @code{Score} context 
-and their @code{outside-staff-priority} is ignored
-relative to the rest of these layout objects, which are
-created in the @code{Staff} context.
-If you wish to place bar numbers or rehearsal marks
-in accordance with the value of their
-@code{outside-staff-priority} the @code{Bar_number_engraver}
-or @code{Mark_engraver} should be removed
-from the @code{Score} context and placed in the top
-@code{Staff} context.
-
-If this ordering does not give you the placing you want, the
-priority of the objects may be overridden.  Suppose we would
+Note that bar numbers, metronome marks and rehearsal marks
+are not shown. By default these are created in the
+@code{Score} context and their @code{outside-staff-priority}
+is ignored relative to the layout objects which are created
+in the @code{Staff} context.
+If you wish to place bar numbers, metronome marks or rehearsal
+marks in accordance with the value of their
+@code{outside-staff-priority} the @code{Bar_number_engraver},
+@code{Metronome_mark_engraver} or @code{Mark_engraver} respectively
+should be removed from the @code{Score} context and placed in the
+top @code{Staff} context.  If this is done, these marks will be
+given the following default @code{outside-staff-priority} values:
+
+@multitable @columnfractions .3 .3
+@headitem Layout Object           @tab Priority
+@item @code{BarNumber}            @tab @code{ 100}
+@item @code{MetronomeMark}        @tab @code{1000}
+@item @code{RehearsalMark}        @tab @code{1500}
+@end multitable
+
+If the default values of @code{outside-staff-priority} does not
+give you the placing you want, the priority of any of the objects
+may be overridden.  Suppose we would
+like the ottava bracket to be placed below the text spanner in the
+example above.  All we need to do is to look up the priority of
+@code{OttavaBracket} in the IR or in the tables above, and reduce
+it to a value lower than that of a @code{TextSpanner}:
+
+@lilypond[quote,fragment,ragged-right,verbatim,relative=1]
+% Set details for later Text Spanner
+\override TextSpanner #'bound-details #'left #'text
+    = \markup { \small \bold Slower }
+% Place dynamics above staff
+\dynamicUp
+%Place following Ottava Bracket below Text Spanners
+\once \override OttavaBracket #'outside-staff-priority = #340
+% Start Ottava Bracket
+#(set-octavation 1)
+c' \startTextSpan
+% Add Dynamic Text
+c\pp
+% Add Dynamic Line Spanner
+c\<
+% Add Text Script
+c^Text
+c c
+% Add Dynamic Text
+c\ff c \stopTextSpan
+% Stop Ottava Bracket
+#(set-octavation 0)
+c, c c c
+@end lilypond
+
+Changing the @code{outside-staff-priority} can also be used to
+control the vertical placement of individual objects, although
+the results may not always be desirable.  Suppose we would
 like @qq{Text3} to be placed above @qq{Text4} in the example
 under Automatic behaviour, above (see @ref{Automatic behaviour}).
 All we need to do is to look up the priority of @code{TextScript}
-in the IR or in the table above, and increase the priority of
+in the IR or in the tables above, and increase the priority of
 @qq{Text3} to a higher value:
 
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
@@ -1576,8 +1642,9 @@ c^"Text4"
 
 This certainly lifts @qq{Text3} above @qq{Text4} but it also
 lifts it above @qq{Text2}, and @qq{Text4} now drops down.
-Perhaps this is not so good.  Can we instead position them all
-at the same distance from the staff?  To do this, we clearly
+Perhaps this is not so good.  What we would really like to do
+is to position all the annotation at the same distance above
+the staff?  To do this, we clearly
 will need to space the notes out horizontally to make more
 room for the text.  This is done using the @code{fatText}
 command.
@@ -1589,7 +1656,7 @@ command.
 
 By default, text produced by markup takes up no horizontal space
 as far as laying out the music is concerned.  The @code{\fatText}
-command reverses this behaviour, causing the notes to be spaced 
+command reverses this behaviour, causing the notes to be spaced
 out as far as is necessary to accommodate the text:
 
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
@@ -1811,7 +1878,7 @@ is controlled by @code{left-padding} and @code{right-padding}.
 These properties are to be found in the @code{AccidentalPlacement}
 object which, note, lives in the @strong{staff} context.  Because
 accidentals are always positioned after and to the left of
- note heads only the @code{right-padding} property has any effect.
+note heads only the @code{right-padding} property has any effect.
 
 The @code{staff-padding} property is closely related to the
 @code{padding} property:  @code{padding}
@@ -2007,7 +2074,7 @@ is handled in the @code{Score} context, property changes in the
 @cindex left-padding property
 @cindex right-padding property
 
-TODO Example of this - at the moment I can't find one! -td
+TODO Example showing the utility of these properties  -td
 
 @subheading staff-padding property
 @cindex staff-padding property
@@ -2912,18 +2979,6 @@ not already anywhere  -td
 
 @end itemize
 
-TODO  Mention line-thickness somewhere else and move this there
-
-@cindex Tweaks, distances
-@cindex Distances
-
-Distances in LilyPond are measured in staff-spaces, while most
-thickness properties are measured in line-thickness.  Some
-properties are different; for example, the thickness of beams
-are measured in staff-spaces.  For more information, see the
-relevant portion of the program reference.
-
-
 
 @node Further tweaking
 @section Further tweaking
@@ -2940,16 +2995,20 @@ relevant portion of the program reference.
 
 @itemize
 
-@item
-Setting the @code{transparent} property will cause an object to be printed
-in @q{invisible ink}: the object is not printed, but all its other
-behavior is retained.  The object still takes up space, it takes part in
-collisions, and slurs, ties, and beams can be attached to it.
-
-@cindex transparent objects
+@cindex transparent property
+@cindex objects, making invisible
 @cindex removing objects
+@cindex objects, removing
 @cindex hiding objects
 @cindex invisible objects
+
+@item
+Setting the @code{transparent} property will cause an object 
+to be printed in @q{invisible ink}: the object is not printed, 
+but all its other behavior is retained.  The object still takes 
+up space, it takes part in collisions, and slurs, ties, and beams
+can be attached to it.
+
 The following example demonstrates how to connect different voices
 using ties.  Normally, ties only connect two notes in the same
 voice.  By introducing a tie in a different voice,
@@ -2989,6 +3048,50 @@ we also lengthen the stem, by setting the @code{length} to
 } >>
 @end lilypond
 
+@cindex stencil property
+
+@item
+For outside-staff objects it is usually better to override the
+object's @code{stencil} property rather than its @code{transparent}
+property when you wish to remove it from the printed output.  
+Setting the @code{stencil} property of an object to @code{#f} will
+remove that object entirely from the printed output.  This means it
+has no effect on the placement of other objects placed relative to
+it.
+
+For example, if we wished to change the metronome setting in order
+to simulate a fermata in the MIDI output we would not want the
+metronome marking to appear in the printed output, and we would
+not want it to influence the spacing between the two systems or
+the spacing of the notes on the staff.  So setting its 
+@code{stencil} property to @code{#f} would be the best way.
+We show here the effect of the two methods:
+
+@lilypond[quote,verbatim]
+\score {
+  \relative c'' {
+    % Visible tempo marking
+    \tempo 4=120
+    a4 a a
+    \once \override Score.MetronomeMark #'transparent = ##t
+    % Invisible tempo marking to lengthen fermata note in MIDI
+    \tempo 4=80
+    a\fermata
+    \once \override Score.MetronomeMark #'stencil = ##f
+    % Invisible tempo marking to restore tempo in MIDI
+    \tempo 4=120
+    a a a a
+  }
+  \midi { }
+}
+@end lilypond
+
+@noindent
+Both methods remove the metronome mark from the printed output,
+and both affect the MIDI timing as required, but the first
+(transparent) metronome mark still influences the note spacing
+while the second (with no stencil) does not.
+
 @end itemize
 
 
@@ -3129,3 +3232,4 @@ In some cases (see issue 246), this must be done before
 
 
 
+
index 12d7fa86bad600691336f22013e94cccadd507ab..3279c7ee3a4bbac85ecc6587974d8e8848d64d83 100644 (file)
@@ -7,15 +7,6 @@
 % Piano sonata 18, Movt II, Scherzo
 % Measures 9 - 14
 
-\paper {
-  #(define dump-extents #t)
-  indent = 0\mm
-  ragged-right = ##t
-  line-width = 16\cm
-  force-assignment = #""
-  line-width = #(- line-width (* mm  3.000000))
-}
-
 \layout { }
 
 \new PianoStaff <<
index 625816d55281c2436e58a7a41592dffdc3facd6d..cc65ce18b3a2a2fe4dcb3c40cce5c773e1a338ff 100644 (file)
@@ -7,17 +7,6 @@
 % Piano sonata 19 - "Leichte Sonate"
 % measures 1 - 12
 
-#(set-global-staff-size 16)
-
-\paper {
-  #(define dump-extents #t)
-  indent = 0\mm
-  ragged-right = ##t
-  line-width = 16\cm
-  force-assignment = #""
-  line-width = #(- line-width (* mm  3.000000))
-}
-
 %\layout {
 %   \context {
 %      \Score
index 7937eb844a64ff5d49c27cd324d13051d9a1d092..4b4f0b84f16ddada2f9b6d77a20ce29af663ea1e 100644 (file)
@@ -7,14 +7,6 @@
 % Piano sonata 21 - Dem Grafen von Waldstein Gewidmet
 % chorale at measures 34 - 40+
 
-\layout {
-   \context {
-      \Score
-      \override SpacingSpanner #'base-shortest-duration = 
-         #(ly:make-moment 1 20) 
-   }
-}
-
 \new PianoStaff <<
 
    % RH Staff
@@ -74,8 +66,8 @@
          |
          b'2. ( \sf \>
          a'4 ) 
-         |
          \clef bass
+         | \break
          s1 \p
          |
          s1
index 3e933c87142dc7423a4e9f464575850493276a88..816990627135c99c68fae463fce14d884a883b2c 100644 (file)
@@ -8,19 +8,8 @@
 % Movt II, Andante con moto
 % Measures 9 - 16
 
-\paper {
-  #(define dump-extents #t)
-  indent = 0\mm
-  ragged-right = ##t
-  line-width = 16\cm
-  force-assignment = #""
-  line-width = #(- line-width (* mm  3.000000))
-}
-
 \layout { }
 
-#(set-global-staff-size 18)
-
 \new PianoStaff <<
 
    \new Staff = RH {
index 4c9ff368b81f29004de9cdad8ee273e859fe9184..2d7dbbf92cc86ab98ed305b34f28c8747e73306b 100644 (file)
@@ -8,18 +8,15 @@
 % Movt II - Abwesenheit
 % Measures 31 - 34
 
-\paper {
-  #(define dump-extents #t)
-  indent = 0\mm
-  ragged-right = ##t
-  line-width = 16\cm
-  force-assignment = #""
-  line-width = #(- line-width (* mm  3.000000))
+\layout {
+   \context {
+      \Score
+      \override SpacingSpanner #'base-shortest-duration = 
+         #(ly:make-moment 1 40) 
+      %\override SpacingSpanner #'strict-grace-spacing = ##t
+   }
 }
 
-\layout { }
-
-#(set-global-staff-size 16)
 \new PianoStaff <<
 
    % RH Staff
index e1826feb1e1f248475a7addb53617cd85ce773eb..f675e9f0ad5bc015f6ce2b432c183a22ed90bf44 100644 (file)
@@ -8,17 +8,6 @@
 % Movt II - Arietta - Adagio molto semplice e cantabile
 % measures 108 - 118
 
-#(set-global-staff-size 16)
-
-\paper {
-  #(define dump-extents #t)
-  indent = 0\mm
-  ragged-right = ##t
-  line-width = 16\cm
-  force-assignment = #""
-  line-width = #(- line-width (* mm  3.000000))
-}
-
 \layout {
    \context {
       \Score
index 362962445b0919d597050e1ba98e5d45cbd59158..3942374a45c7f19b51713785ae0305a0b094ae67 100644 (file)
@@ -7,17 +7,6 @@
 % Piano sonata 29 - Für das Hammer-Klavier
 % Movt IV
 
-#(set-global-staff-size 14)
-
-\paper {
-  #(define dump-extents #t)
-  indent = 0\mm
-  %ragged-right = ##t
-  line-width = 16\cm
-  force-assignment = #""
-  line-width = #(- line-width (* mm  3.000000))
-}
-
 \layout {
    \context {
       \Score
index baad1dc9645f9437025b5acdbc6258abafea2465..c7d8f01e27a56a8e9001eb22f863fb6fd12fb3ba 100644 (file)
@@ -5,18 +5,7 @@
 
 % L. v. Beethoven, Op. 110
 % Piano sonata 31
-% measures 1 - 
-
-#(set-global-staff-size 14)
-
-\paper {
-  #(define dump-extents #t)
-  indent = 0\mm
-  %ragged-right = ##t
-  line-width = 16\cm
-  force-assignment = #""
-  line-width = #(- line-width (* mm  3.000000))
-}
+% measures 1 - 7
 
 \layout {
    \context {