]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/learning/tweaks.itely
Doc: typo (3302)
[lilypond.git] / Documentation / learning / tweaks.itely
index 5002ec7c410e893b8ce51b0734483da47c505c63..3d88ca1c684a3404824c9c3aa54614a1ea07d083 100644 (file)
@@ -8,7 +8,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.17.6"
+@c \version "2.17.11"
 
 @node Tweaking output
 @chapter Tweaking output
@@ -307,7 +307,7 @@ note like this:
 @cindex color property, example
 @cindex NoteHead, example of overriding
 
-@lilypond[quote,fragment,ragged-right,verbatim,relative=1]
+@lilypond[quote,verbatim,relative=1]
 c4 d
 \override NoteHead.color = #red
 e4 f |
@@ -317,6 +317,23 @@ g4 a
 b c |
 @end lilypond
 
+The @code{\once} prefix may also be used in front of many
+predefined commands to limit their effect to one musical moment:
+
+@lilypond[quote,verbatim,relative=1]
+c4 d
+\once \stemDown
+e4 f |
+g4 a
+\once \hideNotes
+b c |
+@end lilypond
+
+However, predefined commands of the form @code{\...Neutral},
+@code{\...Off} and @code{\un...} use @code{\revert} internally rather
+than @code{\override} so prefixing these with @code{\once} has no
+effect.
+
 
 @node The \overrideProperty command
 @unnumberedsubsubsec The @code{\overrideProperty} command
@@ -461,11 +478,11 @@ printed in red on the first short tuplet bracket.
 
 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
 \tweak direction #up
-\times 4/3 {
+\tuplet 3/4 {
   \tweak color #red
-  \times 2/3 { c8[ c c] }
-  \times 2/3 { c8[ c c] }
-  \times 2/3 { c8[ c c] }
+  \tuplet 3/2 { c8[ c c] }
+  \tuplet 3/2 { c8[ c c] }
+  \tuplet 3/2 { c8[ c c] }
 }
 @end lilypond
 
@@ -479,14 +496,14 @@ appearance may be modified in the usual way with
 @cindex TupletNumber, example of overriding
 
 @lilypond[quote,ragged-right,verbatim,fragment,relative=1]
-\times 2/3 { c8[ c c] }
+\tuplet 3/2 { c8[ c c] }
 \once \override TupletNumber.text = #tuplet-number::calc-fraction-text
-\times 2/3 {
+\tuplet 3/2 {
   c8[ c]
   c8[ c]
   \once \override TupletNumber.transparent = ##t
-  \times 2/3 { c8[ c c] }
-  \times 2/3 { c8[ c c] }
+  \tuplet 3/2 { c8[ c c] }
+  \tuplet 3/2 { c8[ c c] }
 }
 @end lilypond
 
@@ -914,7 +931,10 @@ property name in the IR.  Here is a list of the types you may
 need, together with the rules for that type, and some examples.
 You must always add a hash symbol, @code{#}, of course,
 to the front of these values when they are entered in the
-@code{\override} command.
+@code{\override} command, even if the value itself already
+starts with@tie{}@code{#}.  We only give examples for constants
+here: if you want to compute a value using Scheme, see
+@rextend{Calculations in Scheme}.
 
 @multitable @columnfractions .2 .45 .35
 @headitem Property type
@@ -924,32 +944,33 @@ to the front of these values when they are entered in the
   @tab Either True or False, represented by #t or #f
   @tab @code{#t}, @code{#f}
 @item Dimension (in staff space)
-  @tab A positive decimal number (in units of staff space)
+  @tab A decimal number (in units of staff space)
   @tab @code{2.5}, @code{0.34}
 @item Direction
-  @tab A valid direction constant or its numerical equivalent (decimal
-values between -1 and 1 are allowed)
+  @tab A valid direction constant or its numerical equivalent
+  (@code{0} or @code{CENTER} indicate a neutral direction)
   @tab @code{LEFT}, @code{CENTER}, @code{UP},
        @code{1}, @w{@code{-1}}
 @item Integer
-  @tab A positive whole number
-  @tab @code{3}, @code{1}
+  @tab A whole number
+  @tab @code{3}, @code{-1}
 @item List
-  @tab A set of values separated by spaces, enclosed in parentheses
-and preceded by an apostrophe
-  @tab @code{'(left-edge staff-bar)}, @code{'(1)},
+  @tab A sequence of constants or symbols separated by spaces, enclosed
+  in parentheses
+and preceded by an apostrophe (quote mark)
+  @tab @code{'(left-edge staff-bar)}, @code{'(1)}, @code{'()},
        @code{'(1.0 0.25 0.5)}
 @item Markup
   @tab Any valid markup
-  @tab @code{\markup @{ \italic "cresc." @}}
+  @tab @code{\markup @{ \italic "cresc." @}}, @code{"bagpipe"}
 @item Moment
   @tab A fraction of a whole note constructed with the
 make-moment function
-  @tab @code{(ly:make-moment 1 4)},
-       @code{(ly:make-moment 3 8)}
+  @tab @code{(ly:make-moment 1/4)},
+       @code{(ly:make-moment 3/8)}
 @item Number
-  @tab Any positive or negative decimal value
-  @tab @code{3.5}, @w{@code{-2.45}}
+  @tab Any positive or negative, possibly decimal, value
+  @tab @code{3}, @w{@code{-2.45}}
 @item Pair (of numbers)
   @tab Two numbers separated by a @q{space . space} and enclosed
 in brackets preceded by an apostrophe
@@ -963,9 +984,9 @@ preceded by an apostrophe
   @tab @code{bend::print}, @code{ly:text-interface::print},
        @code{#f}
 @item Vector
-  @tab A list of three items enclosed in parentheses and preceded
-by apostrophe-hash, @code{'#}.
-  @tab @code{'#(#t #t #f)}
+  @tab Constants
+  enclosed in @code{#(}@dots{}@code{)}.
+  @tab @code{#(#t #t #f)}
 @end multitable
 
 
@@ -2261,9 +2282,9 @@ c2^"Text4" |
 @end lilypond
 
 The command to revert to the default behavior is
-@code{\textLengthOff}.  Remember @code{\once} only works with
-@code{\override}, @code{\set}, @code{\revert} or @code{\unset},
-so cannot be used with @code{\textLengthOn}.
+@code{\textLengthOff}.  Alternatively, @code{\once} may be used
+with @code{\textLengthOn} if the effect is to be limited to just a
+single musical moment.
 
 @cindex markup text, allowing collisions
 
@@ -2963,7 +2984,7 @@ the second measure of eighth notes, but not to any of the beams in the
 second voice.
 
 @node The force-hshift property
-@unnumberedsubsubsec The @code{force-hshift property}
+@unnumberedsubsubsec The @code{force-hshift} property
 
 We can now see how to apply the final corrections to the Chopin
 example introduced at the end of @ref{I'm hearing Voices}, which
@@ -3851,7 +3872,7 @@ inst =
 #(define-music-function
      (parser location string)
      (string?)
-   #{ ^\markup \bold \box #string #})
+   #{ <>^\markup \bold \box #string #})
 
 \relative c'' {
   \tempo 4=50
@@ -3884,7 +3905,7 @@ inst =
 #(define-music-function
      (parser location string)
      (string?)
-   #@{ ^\markup \bold \box #string #@})
+   #@{ <>^\markup \bold \box #string #@})
 @end example
 
 We will refer to this file using the @code{\include} command near
@@ -3922,7 +3943,7 @@ inst =
 #(define-music-function
      (parser location string)
      (string?)
-   #{ ^\markup \bold \box #string #})
+   #{ <>^\markup \bold \box #string #})
 
 \relative c'' {
   \tempo 4=50
@@ -3957,12 +3978,12 @@ inst =
 #(define-music-function
      (parser location string)
      (string?)
-   #@{ ^\markup \bold \box #string #@})
+   #@{ <>^\markup \bold \box #string #@})
 
 \layout@{
   \context @{
     \Score
-    \override MetronomeMark.extra-offset = #'(-9 . 0)
+    \override MetronomeMark.extra-offset = #'(-5 . 0)
     \override MetronomeMark.padding = #'3
   @}
   \context @{
@@ -3990,12 +4011,12 @@ inst =
 #(define-music-function
      (parser location string)
      (string?)
-   #{ ^\markup \bold \box #string #})
+   #{ <>^\markup \bold \box #string #})
 
 \layout{
   \context {
     \Score
-    \override MetronomeMark.extra-offset = #'(-9 . 0)
+    \override MetronomeMark.extra-offset = #'(-5 . 0)
     \override MetronomeMark.padding = #'3
   }
   \context {
@@ -4041,14 +4062,14 @@ inst =
 #(define-music-function
      (parser location string)
      (string?)
-   #@{ ^\markup \bold \box #string #@})
+   #@{ <>^\markup \bold \box #string #@})
 
 #(set-global-staff-size 23)
 
 \layout@{
   \context @{
     \Score
-    \override MetronomeMark.extra-offset = #'(-9 . 0)
+    \override MetronomeMark.extra-offset = #'(-5 . 0)
     \override MetronomeMark.padding = #'3
   @}
   \context @{
@@ -4075,13 +4096,13 @@ inst =
 #(define-music-function
      (parser location string)
      (string?)
-   #{ ^\markup \bold \box #string #})
+   #{ <>^\markup \bold \box #string #})
 
 #(set-global-staff-size 23)
 
 \layout{
   \context { \Score
-    \override MetronomeMark.extra-offset = #'(-9 . 0)
+    \override MetronomeMark.extra-offset = #'(-5 . 0)
     \override MetronomeMark.padding = #'3
   }
   \context { \Voice