From 2e5f0793242a8a2a4c361764f73d10fb9364b776 Mon Sep 17 00:00:00 2001 From: Phil Holmes Date: Fri, 28 Jun 2013 18:02:31 +0100 Subject: [PATCH] Updates to NR sections 3 and 4 --- Documentation/notation/input.itely | 44 ++--- Documentation/notation/spacing.itely | 273 ++++++++++++--------------- 2 files changed, 136 insertions(+), 181 deletions(-) diff --git a/Documentation/notation/input.itely b/Documentation/notation/input.itely index c7a5142f10..4381f68af3 100644 --- a/Documentation/notation/input.itely +++ b/Documentation/notation/input.itely @@ -725,7 +725,7 @@ Notation Reference: This example demonstrates all @code{\header} variables: -@lilypond[papersize=a7,quote,verbatim,noragged-right] +@lilypond[papersize=a6landscape,quote,verbatim,noragged-right] \book { \header { % The following fields are centered @@ -809,7 +809,7 @@ that is itself in a @code{\score} block, to make the higher-level @code{\header} block titles appear on the first page on their own, with the music (defined in the @code{\score} block) starting on the next. -@lilypond[papersize=a8landscape,verbatim,noragged-right] +@lilypond[papersize=c7landscape,verbatim,noragged-right] \book { \header { title = "This is my Title" @@ -875,16 +875,6 @@ the @code{copyright} text if there is only a single page. @end itemize -@lilypond[papersize=a8landscape] -\book { - \score { - \relative c' { - c4 d e f - } - } -} -@end lilypond - The default tagline can be changed by adding a @code{tagline} in the top-level @code{\header} block. @@ -928,7 +918,7 @@ footer and title text within the @code{\header} block. { s1 } \header { piece = \markup { \fontsize #4 \bold "PRAELUDIUM I" } - subtitle = \markup { \italic "(Excerpt)" } + opus = \markup { \italic "BWV 846" } } } @end lilypond @@ -2200,17 +2190,17 @@ sections. Alternatively, you can use a single @lilypond[verbatim,quote] music = \relative c'' { -\tag #'A { a4 a a a } -\tag #'B { b4 b b b } -\tag #'C { c4 c c c } -\tag #'D { d4 d d d } + \tag #'A { a4 a a a } + \tag #'B { b4 b b b } + \tag #'C { c4 c c c } + \tag #'D { d4 d d d } } -{ -\removeWithTag #'B -\removeWithTag #'C -\music -\removeWithTag #'(B C) -\music +\new Voice { + \removeWithTag #'B + \removeWithTag #'C + \music + \removeWithTag #'(B C) + \music } @end lilypond @@ -2540,10 +2530,10 @@ are adding notes) is interesting to view and correct. To speed up this correction process, it is possible to skip typesetting of all but the last few measures. This is achieved by putting -@verbatim +@example showLastLength = R1*5 -\score { @dots{} } -@end verbatim +\score @{ @dots{} @} +@end example @noindent in your source file. This will render only the last 5 measures @@ -3336,7 +3326,7 @@ will display By default, LilyPond will print these messages to the console along with all the other LilyPond compilation messages. To split -up these messages and save the results of @code{\display@{STUFF@}}, +up these messages and save the results of @code{\displayLilyMusic}, redirect the output to a file. @example diff --git a/Documentation/notation/spacing.itely b/Documentation/notation/spacing.itely index 6ca227e5f8..91eeefa4e8 100644 --- a/Documentation/notation/spacing.itely +++ b/Documentation/notation/spacing.itely @@ -1801,21 +1801,25 @@ breaking layout information. @lilypond[quote,verbatim] music = \relative c'' { c4 c c c } -\score { - \new Staff << - \new Voice { - s1 * 2 \break - s1 * 3 \break - s1 * 6 \break - s1 * 5 \break - } - \new Voice { - \repeat unfold 2 { \music } - \repeat unfold 3 { \music } - \repeat unfold 6 { \music } - \repeat unfold 5 { \music } - } - >> +\header { tagline = ##f } +\paper { left-margin = 0\mm } +\book { + \score { + \new Staff << + \new Voice { + s1 * 2 \break + s1 * 3 \break + s1 * 6 \break + s1 * 5 \break + } + \new Voice { + \repeat unfold 2 { \music } + \repeat unfold 3 { \music } + \repeat unfold 6 { \music } + \repeat unfold 5 { \music } + } + >> + } } @end lilypond @@ -1826,28 +1830,36 @@ This pattern becomes especially helpful when overriding @lilypond[quote,verbatim] music = \relative c'' { c4 c c c } -\score { - \new Staff << - \new Voice { - \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 0)) - s1 * 2 \break - - \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 35)) - s1 * 3 \break - - \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 70)) - s1 * 6 \break - - \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 105)) - s1 * 5 \break - } - \new Voice { - \repeat unfold 2 { \music } - \repeat unfold 3 { \music } - \repeat unfold 6 { \music } - \repeat unfold 5 { \music } - } - >> +\header { tagline = ##f } +\paper { left-margin = 0\mm } +\book { + \score { + \new Staff << + \new Voice { + \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details + #'((Y-offset . 0)) + s1 * 2 \break + + \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details + #'((Y-offset . 5)) + s1 * 3 \break + + \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details + #'((Y-offset . 15)) + s1 * 6 \break + + \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details + #'((Y-offset . 30)) + s1 * 5 \break + } + \new Voice { + \repeat unfold 2 { \music } + \repeat unfold 3 { \music } + \repeat unfold 6 { \music } + \repeat unfold 5 { \music } + } + >> + } } @end lilypond @@ -2474,18 +2486,23 @@ example @code{NonMusicalPaperColumn} overrides with the special @code{\overrideProperty} command: @example -\overrideProperty NonMusicalPaperColumn.line-break-system-details #'((X-offset . 20)) +\overrideProperty NonMusicalPaperColumn.line-break-system-details + #'((X-offset . 20)) -\overrideProperty NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 40)) +\overrideProperty NonMusicalPaperColumn.line-break-system-details + #'((Y-offset . 40)) -\overrideProperty NonMusicalPaperColumn.line-break-system-details #'((X-offset . 20) - (Y-offset . 40)) +\overrideProperty NonMusicalPaperColumn.line-break-system-details + #'((X-offset . 20) + (Y-offset . 40)) -\overrideProperty NonMusicalPaperColumn.line-break-system-details #'((alignment-distances . (15))) +\overrideProperty NonMusicalPaperColumn.line-break-system-details + #'((alignment-distances . (15))) -\overrideProperty NonMusicalPaperColumn.line-break-system-details #'((X-offset . 20) - (Y-offset . 40) - (alignment-distances . (15))) +\overrideProperty NonMusicalPaperColumn.line-break-system-details + #'((X-offset . 20) + (Y-offset . 40) + (alignment-distances . (15))) @end example To understand how each of these different settings work, we begin @@ -2535,11 +2552,14 @@ attribute of the @code{NonMusicalPaperColumn} grob: << \new Staff << \new Voice { - \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 0)) + \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details + #'((Y-offset . 0)) s1*5 \break - \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 40)) + \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details + #'((Y-offset . 40)) s1*5 \break - \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 80)) + \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details + #'((Y-offset . 60)) s1*5 \break } \new Voice { \repeat unfold 15 { c'4 c' c' c' } } @@ -2570,14 +2590,17 @@ subproperty of @code{line-break-system-details}. << \new Staff << \new Voice { - \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 20) - (alignment-distances . (15))) + \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details + #'((Y-offset . 20) + (alignment-distances . (10))) s1*5 \break - \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 60) - (alignment-distances . (15))) + \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details + #'((Y-offset . 60) + (alignment-distances . (15))) s1*5 \break - \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 100) - (alignment-distances . (15))) + \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details + #'((Y-offset . 85) + (alignment-distances . (20))) s1*5 \break } \new Voice { \repeat unfold 15 { c'4 c' c' c' } } @@ -2608,14 +2631,17 @@ specifies the vertical positioning of staves but not of staff groups. << \new Staff << \new Voice { - \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 0) - (alignment-distances . (30 10))) + \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details + #'((Y-offset . 0) + (alignment-distances . (30 10))) s1*5 \break - \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 60) - (alignment-distances . (10 10))) + \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details + #'((Y-offset . 60) + (alignment-distances . (10 10))) s1*5 \break - \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 100) - (alignment-distances . (10 30))) + \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details + #'((Y-offset . 100) + (alignment-distances . (10 30))) s1*5 \break } \new Voice { \repeat unfold 15 { c'4 c' c' c' } } @@ -2709,26 +2735,19 @@ c^"This text is placed close to the previous text" @end lilypond -By default, outside-staff objects are placed only to avoid +By default, outside-staff objects are placed so they avoid a horizontal collision with previously-positioned grobs. This -can lead to situations in which objects are placed very close to each -other horizontally. The vertical spacing between staves can -also be set so that outside staff objects are interleaved. -Setting @code{outside-staff-horizontal-padding} -causes an object to be offset vertically so that such a situation -doesn't occur. +can lead to situations in which objects are placed close to each +other horizontally. +As shown in the example below, setting @code{outside-staff-horizontal-padding} +increases the horizontal spacing required, and in this case moves the text up +to prevent it from getting too close to the ledger lines. @lilypond[quote,ragged-right,relative=2,verbatim] -% the markup is too close to the following note -c4^"Text" -c4 -c''2 -% setting outside-staff-horizontal-padding fixes this +c4^"Word" c c''2 R1 \once \override TextScript.outside-staff-horizontal-padding = #1 -c,,4^"Text" -c4 -c''2 +c,,4^"Word" c c''2 @end lilypond @seealso @@ -2768,8 +2787,9 @@ For example, the following piece contains lots of half, quarter, and The quarter note is followed by 2 NHW, the half by 3 NHW, etc. @lilypond[quote,verbatim,relative=1] -c2 c4. c8 c4. c8 c4. c8 c8 -c8 c4 c4 c4 +c2 c4. c8 +c4. c8 c4. c8 +c8 c c4 c c @end lilypond Normally, @code{spacing-increment} is set to 1.2 staff space, which is @@ -2811,7 +2831,7 @@ the common shortest note. So if we were to add only a few 16th notes to the example above, they would be followed by half a NHW: @lilypond[quote,verbatim,relative=2] -c2 c4. c8 c4. c16[ c] c4. c8 c8 c8 c4 c4 c4 +c2 c4. c8 | c4. c16[ c] c4. c8 | c8 c c4 c c @end lilypond @@ -2971,16 +2991,10 @@ property can only be changed at the beginning of a score, \score { << \new Staff { - \tuplet 5/4 { - c8 c8 c8 c8 c8 - } - c8 c8 c8 c8 + \tuplet 5/4 { c8 c c c c } c8 c c c } \new Staff { - c8 c8 c8 c8 - \tuplet 5/4 { - c8 c8 c8 c8 c8 - } + c8 c c c \tuplet 5/4 { c8 c c c c } } >> \layout { @@ -2997,7 +3011,7 @@ regard for clefs, bar lines, and grace notes, @lilypond[quote,ragged-right,relative=2,verbatim] \override Score.SpacingSpanner.strict-note-spacing = ##t -\new Staff { c8[ c \clef alto c \grace { c16[ c] } c8 c c] c32[ c32] } +\new Staff { c8[ c \clef alto c \grace { c16[ c] } c8 c c] c32[ c] } @end lilypond @seealso @@ -3090,11 +3104,7 @@ spacing with ragged-right turned on. \score { << \new RhythmicStaff { - c'2 - c'16 c'16 c'16 c'16 - \tuplet 5/4 { - c'16 c'16 c'16 c'16 c'16 - } + c'2 c'16 c' c' c' \tuplet 5/4 { c'16 c' c' c' c' } } >> } @@ -3119,11 +3129,7 @@ setting. \score { << \new RhythmicStaff { - c'2 - c'16 c'16 c'16 c'16 - \tuplet 5/4 { - c'16 c'16 c'16 c'16 c'16 - } + c'2 c'16 c' c' c' \tuplet 5/4 { c'16 c' c' c' c' } } >> \layout { @@ -3167,11 +3173,7 @@ larger reference durations space music tightly. \score { << \new RhythmicStaff { - c'2 - c'16 c'16 c'16 c'16 - \tuplet 5/4 { - c'16 c'16 c'16 c'16 c'16 - } + c'2 c'16 c' c' c' \tuplet 5/4 { c'16 c' c' c' c' } } >> \layout { @@ -3185,11 +3187,7 @@ larger reference durations space music tightly. \score { << \new RhythmicStaff { - c'2 - c'16 c'16 c'16 c'16 - \tuplet 5/4 { - c'16 c'16 c'16 c'16 c'16 - } + c'2 c'16 c' c' c' \tuplet 5/4 { c'16 c' c' c' c' } } >> \layout { @@ -3203,11 +3201,7 @@ larger reference durations space music tightly. \score { << \new RhythmicStaff { - c'2 - c'16 c'16 c'16 c'16 - \tuplet 5/4 { - c'16 c'16 c'16 c'16 c'16 - } + c'2 c'16 c' c' c' \tuplet 5/4 { c'16 c' c' c' c' } } >> \layout { @@ -3235,16 +3229,10 @@ tuplet. \score { << \new RhythmicStaff { - c'2 - c'16 c'16 c'16 c'16 - \tuplet 5/4 { - c'16 c'16 c'16 c'16 c'16 - } + c'2 c'16 c' c' c' \tuplet 5/4 { c'16 c' c' c' c' } } \new RhythmicStaff { - \tuplet 9/8 { - c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8 - } + \tuplet 9/8 { c'8 c' c' c' c' c' c' c' c' } } >> } @@ -3259,16 +3247,10 @@ result. Setting @code{proportionalNotationDuration} fixes this. \score { << \new RhythmicStaff { - c'2 - c'16 c'16 c'16 c'16 - \tuplet 5/4 { - c'16 c'16 c'16 c'16 c'16 - } + c'2 c'16 c' c' c' \tuplet 5/4 { c'16 c' c' c' c' } } \new RhythmicStaff { - \tuplet 9/8 { - c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8 - } + \tuplet 9/8 { c'8 c' c' c' c' c' c' c' c' } } >> \layout { @@ -3290,16 +3272,10 @@ turn on @code{uniform-stretching}, which is a property of \score { << \new RhythmicStaff { - c'2 - c'16 c'16 c'16 c'16 - \tuplet 5/4 { - c'16 c'16 c'16 c'16 c'16 - } + c'2 c'16 c' c' c' \tuplet 5/4 { c'16 c' c' c' c' } } \new RhythmicStaff { - \tuplet 9/8 { - c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8 - } + \tuplet 9/8 { c'8 c' c' c' c' c' c' c' c' } } >> \layout { @@ -3395,23 +3371,13 @@ property of @code{SpacingSpanner}. Compare the two scores below: @lilypond[quote,verbatim,ragged-right] \new Staff { \set Score.proportionalNotationDuration = #(ly:make-moment 1/16) - c''8 - c''8 - c''8 - \clef alto - d'8 - d'2 + c''8 c'' c'' \clef alto d' 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 + c''8 c'' c'' \clef alto d' d'2 } @end lilypond @@ -3427,7 +3393,7 @@ that frequently appear in proportional scores. These include: @itemize @item @code{\override SpacingSpanner.strict-grace-spacing = ##t} -@item @code{tupletFullLength = ##t} +@item @code{\set tupletFullLength = ##t} @item @code{\override Beam.breakable = ##t} @item @code{\override Glissando.breakable = ##t} @item @code{\override TextSpanner.breakable = ##t} @@ -3476,9 +3442,7 @@ To graphically display the dimensions of vertical layout variables that may be altered for page formatting, set @code{annotate-spacing} in the @code{\paper} block: -@c need to have \book{} otherwise we get the separate systems. -hwn -@lilypond[verbatim,quote] -#(set-default-paper-size "a6" 'landscape) +@lilypond[verbatim,quote,papersize=a6landscape] \book { \score { { c4 } } \paper { annotate-spacing = ##t } @@ -3580,7 +3544,7 @@ a system can be moved closer to the staff: @lilypond[verbatim,quote,relative=1] e4 c g\f c -e4 c g-\tweak X-offset #-2.7 -\tweak Y-offset #2.5 \f c +e4 c g-\tweak X-offset #-2.7 \f c @end lilypond @item @@ -3618,7 +3582,8 @@ duration longer, a @q{squeezing} effect occurs: \layout { \context { \Score - \override SpacingSpanner.common-shortest-duration = #(ly:make-moment 1/2) + \override SpacingSpanner.common-shortest-duration = + #(ly:make-moment 1/2) } } } -- 2.39.2