Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(618)

Side by Side Diff: Documentation/notation/spacing.itely

Issue 6635050: Make arguments like Context.GrobName accessible as symbol lists (Closed) Base URL: http://git.savannah.gnu.org/gitweb/?p=lilypond.git/trunk/
Patch Set: Allow \override Accidental.color = #red (dot between grob and property) Created 12 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Documentation/notation/simultaneous.itely ('k') | Documentation/notation/staff.itely » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 @c -*- coding: utf-8; mode: texinfo; -*- 1 @c -*- coding: utf-8; mode: texinfo; -*-
2 2
3 @ignore 3 @ignore
4 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH 4 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5 5
6 When revising a translation, copy the HEAD committish of the 6 When revising a translation, copy the HEAD committish of the
7 version that you are working on. For details, see the Contributors' 7 version that you are working on. For details, see the Contributors'
8 Guide, node Updating translation committishes.. 8 Guide, node Updating translation committishes..
9 @end ignore 9 @end ignore
10 10
11 @c \version "2.16.0" 11 @c \version "2.17.6"
12 12
13 @ignore 13 @ignore
14 GDP TODO list 14 GDP TODO list
15 15
16 Negative numbers are allowed: 16 Negative numbers are allowed:
17 > Are you sure? The following works well 17 > Are you sure? The following works well
18 > \paper{ 18 > \paper{
19 > first-page-number = -2 19 > first-page-number = -2
20 > } 20 > }
21 > and prints page number -1 on the second page, for example. 21 > and prints page number -1 on the second page, for example.
22 22
23 23
24 In 5.2.1 the @refbugs (line 495 in spacing.itely on master) it 24 In 5.2.1 the @refbugs (line 495 in spacing.itely on master) it
25 states: 25 states:
26 26
27 "@code{layout-set-staff-size} does not change the distance between 27 "@code{layout-set-staff-size} does not change the distance between
28 the 28 the
29 staff lines." 29 staff lines."
30 30
31 Could we add a sentence: 31 Could we add a sentence:
32 "Use instead the pair fontSize = #@var{N} 32 "Use instead the pair fontSize = #@var{N}
33 \override StaffSymbol #'staff-space = #(magstep 33 \override StaffSymbol.staff-space = #(magstep
34 @var{N}) 34 @var{N})
35 inside the Staff context to change the size of the font and the 35 inside the Staff context to change the size of the font and the
36 distance between 36 distance between
37 staff lines accordingly." 37 staff lines accordingly."
38 38
39 Actually I found, that the @internalsref{StaffSymbol} at line 481 39 Actually I found, that the @internalsref{StaffSymbol} at line 481
40 sends to an incomplete 40 sends to an incomplete
41 documentation. The property staff-space is not explained here. I 41 documentation. The property staff-space is not explained here. I
42 thought Y-extent might be of 42 thought Y-extent might be of
43 help, but it is in turn explained by x-space which again is 43 help, but it is in turn explained by x-space which again is
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 1109
1110 @end itemize 1110 @end itemize
1111 1111
1112 Here is an example @code{\layout} block: 1112 Here is an example @code{\layout} block:
1113 1113
1114 @example 1114 @example
1115 \layout @{ 1115 \layout @{
1116 indent = 2\cm 1116 indent = 2\cm
1117 \context @{ 1117 \context @{
1118 \StaffGroup 1118 \StaffGroup
1119 \override StaffGrouper #'staff-staff-spacing #'basic-distance = #8 1119 \override StaffGrouper.staff-staff-spacing.basic-distance = #8
1120 @} 1120 @}
1121 \context @{ 1121 \context @{
1122 \Voice 1122 \Voice
1123 \override TextScript #'padding = #1 1123 \override TextScript.padding = #1
1124 \override Glissando #'thickness = #3 1124 \override Glissando.thickness = #3
1125 @} 1125 @}
1126 @} 1126 @}
1127 @end example 1127 @end example
1128 1128
1129 Multiple @code{\layout} blocks can be entered as toplevel expressions. 1129 Multiple @code{\layout} blocks can be entered as toplevel expressions.
1130 This can, for example, be useful if different settings are stored in 1130 This can, for example, be useful if different settings are stored in
1131 separate files and included optionally. Internally, when 1131 separate files and included optionally. Internally, when
1132 a @code{\layout} block is evaluated, a copy of the current 1132 a @code{\layout} block is evaluated, a copy of the current
1133 @code{\layout} configuration is made, then any changes defined within 1133 @code{\layout} configuration is made, then any changes defined within
1134 the block are applied and the result is saved as the new current 1134 the block are applied and the result is saved as the new current
1135 configuration. From the user's perspective the @code{\layout} blocks 1135 configuration. From the user's perspective the @code{\layout} blocks
1136 are combined, but in conflicting situations (when the same property 1136 are combined, but in conflicting situations (when the same property
1137 is changed in different blocks) the later definitions take precedence. 1137 is changed in different blocks) the later definitions take precedence.
1138 1138
1139 For example, if this block: 1139 For example, if this block:
1140 1140
1141 @example 1141 @example
1142 \layout @{ 1142 \layout @{
1143 \context @{ 1143 \context @{
1144 \Voice 1144 \Voice
1145 \override TextScript #'color = #magenta 1145 \override TextScript.color = #magenta
1146 \override Glissando #'thickness = #1.5 1146 \override Glissando.thickness = #1.5
1147 @} 1147 @}
1148 @} 1148 @}
1149 @end example 1149 @end example
1150 1150
1151 is placed after the one from the preceding example the @code{'padding} 1151 is placed after the one from the preceding example the @code{'padding}
1152 and @code{'color} overrides for @code{TextScript} are combined, but 1152 and @code{'color} overrides for @code{TextScript} are combined, but
1153 the later @code{'thickness} override for @code{Glissando} replaces 1153 the later @code{'thickness} override for @code{Glissando} replaces
1154 (or hides) the earlier one. 1154 (or hides) the earlier one.
1155 1155
1156 @code{\layout} blocks may be assigned to variables for reuse later, 1156 @code{\layout} blocks may be assigned to variables for reuse later,
1157 but the way this works is slightly but significantly different from 1157 but the way this works is slightly but significantly different from
1158 writing them literally. 1158 writing them literally.
1159 1159
1160 If a variable is defined like this: 1160 If a variable is defined like this:
1161 1161
1162 @example 1162 @example
1163 layoutVariable = \layout @{ 1163 layoutVariable = \layout @{
1164 \context @{ 1164 \context @{
1165 \Voice 1165 \Voice
1166 \override NoteHead #'font-size = #4 1166 \override NoteHead.font-size = #4
1167 @} 1167 @}
1168 @} 1168 @}
1169 @end example 1169 @end example
1170 1170
1171 it will hold the current @code{\layout} configuration with the 1171 it will hold the current @code{\layout} configuration with the
1172 @code{NoteHead #'font-size} override added, but this combination 1172 @code{NoteHead #'font-size} override added, but this combination
1173 is @emph{not} saved as the new current configuration. Be aware 1173 is @emph{not} saved as the new current configuration. Be aware
1174 that the @q{current configuration} is read when the variable is 1174 that the @q{current configuration} is read when the variable is
1175 defined and not when it is used, so the content of the variable 1175 defined and not when it is used, so the content of the variable
1176 is dependent on its position in the source. 1176 is dependent on its position in the source.
1177 1177
1178 The variable can then be used inside another @code{\layout} block, 1178 The variable can then be used inside another @code{\layout} block,
1179 for example: 1179 for example:
1180 1180
1181 @example 1181 @example
1182 \layout @{ 1182 \layout @{
1183 \layoutVariable 1183 \layoutVariable
1184 \context @{ 1184 \context @{
1185 \Voice 1185 \Voice
1186 \override NoteHead #'color = #red 1186 \override NoteHead.color = #red
1187 @} 1187 @}
1188 @} 1188 @}
1189 @end example 1189 @end example
1190 1190
1191 A @code{\layout} block containing a variable, as in the example above, 1191 A @code{\layout} block containing a variable, as in the example above,
1192 does @emph{not} copy the current configuration but instead uses the 1192 does @emph{not} copy the current configuration but instead uses the
1193 content of @code{\layoutVariable} as the base configuration for the 1193 content of @code{\layoutVariable} as the base configuration for the
1194 further additions. This means that any changes defined between the 1194 further additions. This means that any changes defined between the
1195 definition and the use of the variable are lost. 1195 definition and the use of the variable are lost.
1196 1196
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 } \relative c'' { 1394 } \relative c'' {
1395 << 1395 <<
1396 { c2. \times 2/3 { c4 c c } c2. | } 1396 { c2. \times 2/3 { c4 c c } c2. | }
1397 { s1 | \break s1 | } 1397 { s1 | \break s1 | }
1398 >> 1398 >>
1399 } 1399 }
1400 @end lilypond 1400 @end lilypond
1401 1401
1402 Similarly, line breaks are normally forbidden when beams cross bar 1402 Similarly, line breaks are normally forbidden when beams cross bar
1403 lines. This behavior can be changed by setting 1403 lines. This behavior can be changed by setting
1404 @code{\override Beam #'breakable = ##t}: 1404 @code{\override Beam.breakable = ##t}:
1405 1405
1406 @lilypond[quote,ragged-right,relative=2,verbatim] 1406 @lilypond[quote,ragged-right,relative=2,verbatim]
1407 \override Beam #'breakable = ##t 1407 \override Beam.breakable = ##t
1408 c2. c8[ c | \break 1408 c2. c8[ c | \break
1409 c8 c] c2. | 1409 c8 c] c2. |
1410 @end lilypond 1410 @end lilypond
1411 1411
1412 The @code{\noBreak} command forbids a line break at the bar line 1412 The @code{\noBreak} command forbids a line break at the bar line
1413 where it is inserted. 1413 where it is inserted.
1414 1414
1415 The most basic settings influencing line spacing are @code{indent} 1415 The most basic settings influencing line spacing are @code{indent}
1416 and @code{line-width}. They are set in the @code{\layout} block. 1416 and @code{line-width}. They are set in the @code{\layout} block.
1417 They control the indentation of the first line of music, and the 1417 They control the indentation of the first line of music, and the
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 still be honored. The height of the page will 1696 still be honored. The height of the page will
1697 be left unmodified. 1697 be left unmodified.
1698 1698
1699 @node Explicit breaks 1699 @node Explicit breaks
1700 @subsection Explicit breaks 1700 @subsection Explicit breaks
1701 1701
1702 Lily sometimes rejects explicit @code{\break} and @code{\pageBreak} 1702 Lily sometimes rejects explicit @code{\break} and @code{\pageBreak}
1703 commands. There are two commands to override this behavior: 1703 commands. There are two commands to override this behavior:
1704 1704
1705 @example 1705 @example
1706 \override NonMusicalPaperColumn #'line-break-permission = ##f 1706 \override NonMusicalPaperColumn.line-break-permission = ##f
1707 \override NonMusicalPaperColumn #'page-break-permission = ##f 1707 \override NonMusicalPaperColumn.page-break-permission = ##f
1708 @end example 1708 @end example
1709 1709
1710 When @code{line-break-permission} is overridden to false, Lily will insert 1710 When @code{line-break-permission} is overridden to false, Lily will insert
1711 line breaks at explicit @code{\break} commands and nowhere else. When 1711 line breaks at explicit @code{\break} commands and nowhere else. When
1712 @code{page-break-permission} is overridden to false, Lily will insert 1712 @code{page-break-permission} is overridden to false, Lily will insert
1713 page breaks at explicit @code{\pageBreak} commands and nowhere else. 1713 page breaks at explicit @code{\pageBreak} commands and nowhere else.
1714 1714
1715 @lilypond[quote,verbatim] 1715 @lilypond[quote,verbatim]
1716 \paper { 1716 \paper {
1717 indent = #0 1717 indent = #0
(...skipping 10 matching lines...) Expand all
1728 \repeat unfold 6 { \music } \break 1728 \repeat unfold 6 { \music } \break
1729 \repeat unfold 8 { \music } \pageBreak 1729 \repeat unfold 8 { \music } \pageBreak
1730 \repeat unfold 8 { \music } \break 1730 \repeat unfold 8 { \music } \break
1731 \repeat unfold 6 { \music } \break 1731 \repeat unfold 6 { \music } \break
1732 \repeat unfold 4 { \music } \break 1732 \repeat unfold 4 { \music } \break
1733 \repeat unfold 2 { \music } 1733 \repeat unfold 2 { \music }
1734 } 1734 }
1735 \layout { 1735 \layout {
1736 \context { 1736 \context {
1737 \Score 1737 \Score
1738 \override NonMusicalPaperColumn #'line-break-permission = ##f 1738 \override NonMusicalPaperColumn.line-break-permission = ##f
1739 \override NonMusicalPaperColumn #'page-break-permission = ##f 1739 \override NonMusicalPaperColumn.page-break-permission = ##f
1740 } 1740 }
1741 } 1741 }
1742 } 1742 }
1743 @end lilypond 1743 @end lilypond
1744 1744
1745 @seealso 1745 @seealso
1746 Snippets: 1746 Snippets:
1747 @rlsr{Spacing}. 1747 @rlsr{Spacing}.
1748 1748
1749 1749
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1795 This pattern becomes especially helpful when overriding 1795 This pattern becomes especially helpful when overriding
1796 @code{line-break-system-details} and the other useful but long properties of 1796 @code{line-break-system-details} and the other useful but long properties of
1797 @code{NonMusicalPaperColumnGrob}, as explained in @ref{Vertical spacing}. 1797 @code{NonMusicalPaperColumnGrob}, as explained in @ref{Vertical spacing}.
1798 1798
1799 @lilypond[quote,verbatim] 1799 @lilypond[quote,verbatim]
1800 music = \relative c'' { c4 c c c } 1800 music = \relative c'' { c4 c c c }
1801 1801
1802 \score { 1802 \score {
1803 \new Staff << 1803 \new Staff <<
1804 \new Voice { 1804 \new Voice {
1805 \overrideProperty "Score.NonMusicalPaperColumn" 1805 \overrideProperty Score.NonMusicalPaperColumn
1806 #'line-break-system-details #'((Y-offset . 0)) 1806 line-break-system-details #'((Y-offset . 0))
1807 s1 * 2 \break 1807 s1 * 2 \break
1808 1808
1809 \overrideProperty "Score.NonMusicalPaperColumn" 1809 \overrideProperty Score.NonMusicalPaperColumn
1810 #'line-break-system-details #'((Y-offset . 35)) 1810 line-break-system-details #'((Y-offset . 35))
1811 s1 * 3 \break 1811 s1 * 3 \break
1812 1812
1813 \overrideProperty "Score.NonMusicalPaperColumn" 1813 \overrideProperty Score.NonMusicalPaperColumn
1814 #'line-break-system-details #'((Y-offset . 70)) 1814 line-break-system-details #'((Y-offset . 70))
1815 s1 * 6 \break 1815 s1 * 6 \break
1816 1816
1817 \overrideProperty "Score.NonMusicalPaperColumn" 1817 \overrideProperty Score.NonMusicalPaperColumn
1818 #'line-break-system-details #'((Y-offset . 105)) 1818 line-break-system-details #'((Y-offset . 105))
1819 s1 * 5 \break 1819 s1 * 5 \break
1820 } 1820 }
1821 \new Voice { 1821 \new Voice {
1822 \repeat unfold 2 { \music } 1822 \repeat unfold 2 { \music }
1823 \repeat unfold 3 { \music } 1823 \repeat unfold 3 { \music }
1824 \repeat unfold 6 { \music } 1824 \repeat unfold 6 { \music }
1825 \repeat unfold 5 { \music } 1825 \repeat unfold 5 { \music }
1826 } 1826 }
1827 >> 1827 >>
1828 } 1828 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 @item @code{FretBoards} @tab top line 1952 @item @code{FretBoards} @tab top line
1953 @end multitable 1953 @end multitable
1954 1954
1955 In the following image, horizontal lines indicate the positions 1955 In the following image, horizontal lines indicate the positions
1956 of these reference points: 1956 of these reference points:
1957 1957
1958 @lilypond[quote,noragged-right,line-width=110\mm] 1958 @lilypond[quote,noragged-right,line-width=110\mm]
1959 #(define zero-space '((padding . -inf.0) (basic-distance . 0))) 1959 #(define zero-space '((padding . -inf.0) (basic-distance . 0)))
1960 1960
1961 alignToZero = \with { 1961 alignToZero = \with {
1962 \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing = #zero-space 1962 \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #zero-space
1963 \override VerticalAxisGroup #'nonstaff-nonstaff-spacing = #zero-space 1963 \override VerticalAxisGroup.nonstaff-nonstaff-spacing = #zero-space
1964 } 1964 }
1965 lowerCaseChords = \with { 1965 lowerCaseChords = \with {
1966 chordNameLowercaseMinor = ##t 1966 chordNameLowercaseMinor = ##t
1967 } 1967 }
1968 staffAffinityDown = \with { 1968 staffAffinityDown = \with {
1969 \override VerticalAxisGroup #'staff-affinity = #DOWN 1969 \override VerticalAxisGroup.staff-affinity = #DOWN
1970 } 1970 }
1971 labelContext = 1971 labelContext =
1972 #(define-music-function 1972 #(define-music-function
1973 (parser location context) 1973 (parser location context)
1974 (string?) 1974 (string?)
1975 #{ s1*0^\markup { \typewriter #context } #}) 1975 #{ s1*0^\markup { \typewriter #context } #})
1976 1976
1977 \layout { 1977 \layout {
1978 \context { \Dynamics \alignToZero } 1978 \context { \Dynamics \alignToZero }
1979 \context { \FiguredBass \alignToZero } 1979 \context { \FiguredBass \alignToZero }
1980 \context { \Lyrics \alignToZero } 1980 \context { \Lyrics \alignToZero }
1981 \context { \NoteNames \alignToZero \staffAffinityDown } 1981 \context { \NoteNames \alignToZero \staffAffinityDown }
1982 \context { \ChordNames \alignToZero 1982 \context { \ChordNames \alignToZero
1983 \staffAffinityDown 1983 \staffAffinityDown
1984 \lowerCaseChords } 1984 \lowerCaseChords }
1985 \context { \FretBoards \alignToZero \staffAffinityDown } 1985 \context { \FretBoards \alignToZero \staffAffinityDown }
1986 \context { \Score 1986 \context { \Score
1987 \override BarLine #'stencil = ##f 1987 \override BarLine.stencil = ##f
1988 \override DynamicText #'self-alignment-X = #-1 1988 \override DynamicText.self-alignment-X = #-1
1989 \override FretBoard #'X-offset = #1.75 1989 \override FretBoard.X-offset = #1.75
1990 \override InstrumentName #'minimum-Y-extent = #'(-2 . 2) 1990 \override InstrumentName.minimum-Y-extent = #'(-2 . 2)
1991 \override InstrumentName #'extra-offset = #'(0 . -0.5) 1991 \override InstrumentName.extra-offset = #'(0 . -0.5)
1992 \override TextScript #'minimum-Y-extent = #'(-2 . 3) 1992 \override TextScript.minimum-Y-extent = #'(-2 . 3)
1993 \override TimeSignature #'stencil = ##f 1993 \override TimeSignature.stencil = ##f
1994 } 1994 }
1995 } 1995 }
1996 1996
1997 %% These contexts have reference points at the baseline: 1997 %% These contexts have reference points at the baseline:
1998 %% ChordNames, NoteNames, and Lyrics 1998 %% ChordNames, NoteNames, and Lyrics
1999 << 1999 <<
2000 \new ChordNames { \chords { g1:m } } 2000 \new ChordNames { \chords { g1:m } }
2001 \new NoteNames { s1 | g1 | } 2001 \new NoteNames { s1 | g1 | }
2002 \new RhythmicStaff { 2002 \new RhythmicStaff {
2003 \set RhythmicStaff.instrumentName = #"baseline " 2003 \set RhythmicStaff.instrumentName = #"baseline "
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2046 Grob properties should be adjusted with an @code{\override} inside 2046 Grob properties should be adjusted with an @code{\override} inside
2047 a @code{\score} or @code{\layout} block, and not inside a 2047 a @code{\score} or @code{\layout} block, and not inside a
2048 @code{\paper} block. 2048 @code{\paper} block.
2049 2049
2050 The following example demonstrates the two ways these alists can 2050 The following example demonstrates the two ways these alists can
2051 be modified. The first declaration updates one key-value 2051 be modified. The first declaration updates one key-value
2052 individually, and the second completely re-defines the property: 2052 individually, and the second completely re-defines the property:
2053 2053
2054 @example 2054 @example
2055 \new Staff \with @{ 2055 \new Staff \with @{
2056 \override VerticalAxisGroup #'default-staff-staff-spacing 2056 \override VerticalAxisGroup.default-staff-staff-spacing.basic-distance = #10
2057 #'basic-distance = #10
2058 @} @{ @dots{} @} 2057 @} @{ @dots{} @}
2059 2058
2060 \new Staff \with @{ 2059 \new Staff \with @{
2061 \override VerticalAxisGroup #'default-staff-staff-spacing = 2060 \override VerticalAxisGroup.default-staff-staff-spacing =
2062 #'((basic-distance . 10) 2061 #'((basic-distance . 10)
2063 (minimum-distance . 9) 2062 (minimum-distance . 9)
2064 (padding . 1) 2063 (padding . 1)
2065 (stretchability . 10)) 2064 (stretchability . 10))
2066 @} @{ @dots{} @} 2065 @} @{ @dots{} @}
2067 @end example 2066 @end example
2068 2067
2069 To change any spacing settings globally, put them in the 2068 To change any spacing settings globally, put them in the
2070 @code{\layout} block: 2069 @code{\layout} block:
2071 2070
2072 @example 2071 @example
2073 \layout @{ 2072 \layout @{
2074 \context @{ 2073 \context @{
2075 \Staff 2074 \Staff
2076 \override VerticalAxisGroup #'default-staff-staff-spacing 2075 \override VerticalAxisGroup.default-staff-staff-spacing.basic-distance = #10
2077 #'basic-distance = #10
2078 @} 2076 @}
2079 @} 2077 @}
2080 @end example 2078 @end example
2081 2079
2082 Standard settings for the vertical spacing grob properties are 2080 Standard settings for the vertical spacing grob properties are
2083 listed in @rinternals{VerticalAxisGroup} and 2081 listed in @rinternals{VerticalAxisGroup} and
2084 @rinternals{StaffGrouper}. Default overrides for specific types 2082 @rinternals{StaffGrouper}. Default overrides for specific types
2085 of non-staff lines are listed in the relevant context descriptions 2083 of non-staff lines are listed in the relevant context descriptions
2086 in @rinternals{Contexts}. 2084 in @rinternals{Contexts}.
2087 2085
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 The following example shows how the @code{default-staff-staff-spacing} 2223 The following example shows how the @code{default-staff-staff-spacing}
2226 property can affect the spacing of ungrouped staves. 2224 property can affect the spacing of ungrouped staves.
2227 The same overrides applied to @code{staff-staff-spacing} would 2225 The same overrides applied to @code{staff-staff-spacing} would
2228 have the same effect, but would also apply in cases where the staves 2226 have the same effect, but would also apply in cases where the staves
2229 are combined in a group or groups. 2227 are combined in a group or groups.
2230 2228
2231 @lilypond[verbatim,quote,staffsize=16] 2229 @lilypond[verbatim,quote,staffsize=16]
2232 \layout { 2230 \layout {
2233 \context { 2231 \context {
2234 \Staff 2232 \Staff
2235 \override VerticalAxisGroup #'default-staff-staff-spacing = 2233 \override VerticalAxisGroup.default-staff-staff-spacing =
2236 #'((basic-distance . 8) 2234 #'((basic-distance . 8)
2237 (minimum-distance . 7) 2235 (minimum-distance . 7)
2238 (padding . 1)) 2236 (padding . 1))
2239 } 2237 }
2240 } 2238 }
2241 2239
2242 << 2240 <<
2243 % The very low note here needs more room than 'basic-distance 2241 % The very low note here needs more room than 'basic-distance
2244 % can provide, so the distance between this staff and the next 2242 % can provide, so the distance between this staff and the next
2245 % is determined by 'padding. 2243 % is determined by 'padding.
2246 \new Staff { b,2 r | } 2244 \new Staff { b,2 r | }
2247 2245
2248 % Here, 'basic-distance provides enough room, and there is no 2246 % Here, 'basic-distance provides enough room, and there is no
2249 % need to compress the space (towards 'minimum-distance) to make 2247 % need to compress the space (towards 'minimum-distance) to make
2250 % room for anything else on the page, so the distance between 2248 % room for anything else on the page, so the distance between
2251 % this staff and the next is determined by 'basic-distance. 2249 % this staff and the next is determined by 'basic-distance.
2252 \new Staff { \clef bass g2 r | } 2250 \new Staff { \clef bass g2 r | }
2253 2251
2254 % By setting 'padding to a negative value, staves can be made to 2252 % By setting 'padding to a negative value, staves can be made to
2255 % collide. The lowest acceptable value for 'basic-distance is 0. 2253 % collide. The lowest acceptable value for 'basic-distance is 0.
2256 \new Staff \with { 2254 \new Staff \with {
2257 \override VerticalAxisGroup #'default-staff-staff-spacing = 2255 \override VerticalAxisGroup.default-staff-staff-spacing =
2258 #'((basic-distance . 3.5) 2256 #'((basic-distance . 3.5)
2259 (padding . -10)) 2257 (padding . -10))
2260 } { \clef bass g2 r | } 2258 } { \clef bass g2 r | }
2261 \new Staff { \clef bass g2 r | } 2259 \new Staff { \clef bass g2 r | }
2262 >> 2260 >>
2263 @end lilypond 2261 @end lilypond
2264 2262
2265 @seealso 2263 @seealso
2266 Installed Files: 2264 Installed Files:
2267 @file{scm/define-grobs.scm}. 2265 @file{scm/define-grobs.scm}.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2302 These grob properties are described individually above; see 2300 These grob properties are described individually above; see
2303 @ref{Within-system spacing properties}. 2301 @ref{Within-system spacing properties}.
2304 2302
2305 The following example shows how properties of the 2303 The following example shows how properties of the
2306 @code{StaffGrouper} grob can affect the spacing of grouped staves: 2304 @code{StaffGrouper} grob can affect the spacing of grouped staves:
2307 2305
2308 @lilypond[verbatim,quote,staffsize=16] 2306 @lilypond[verbatim,quote,staffsize=16]
2309 \layout { 2307 \layout {
2310 \context { 2308 \context {
2311 \Score 2309 \Score
2312 \override StaffGrouper #'staff-staff-spacing #'padding = #0 2310 \override StaffGrouper.staff-staff-spacing.padding = #0
2313 \override StaffGrouper #'staff-staff-spacing #'basic-distance = #1 2311 \override StaffGrouper.staff-staff-spacing.basic-distance = #1
2314 } 2312 }
2315 } 2313 }
2316 2314
2317 << 2315 <<
2318 \new PianoStaff \with { 2316 \new PianoStaff \with {
2319 \override StaffGrouper #'staffgroup-staff-spacing #'basic-distance = #20 2317 \override StaffGrouper.staffgroup-staff-spacing.basic-distance = #20
2320 } << 2318 } <<
2321 \new Staff { c'1 } 2319 \new Staff { c'1 }
2322 \new Staff { c'1 } 2320 \new Staff { c'1 }
2323 >> 2321 >>
2324 2322
2325 \new StaffGroup << 2323 \new StaffGroup <<
2326 \new Staff { c'1 } 2324 \new Staff { c'1 }
2327 \new Staff { c'1 } 2325 \new Staff { c'1 }
2328 >> 2326 >>
2329 >> 2327 >>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 The following example shows how the 2366 The following example shows how the
2369 @code{nonstaff-nonstaff-spacing} property can affect the spacing 2367 @code{nonstaff-nonstaff-spacing} property can affect the spacing
2370 of consecutive non-staff lines. Here, by setting the 2368 of consecutive non-staff lines. Here, by setting the
2371 @code{stretchability} key to a very high value, the lyrics are 2369 @code{stretchability} key to a very high value, the lyrics are
2372 able to stretch much more than usual: 2370 able to stretch much more than usual:
2373 2371
2374 @lilypond[verbatim,quote,staffsize=16] 2372 @lilypond[verbatim,quote,staffsize=16]
2375 \layout { 2373 \layout {
2376 \context { 2374 \context {
2377 \Lyrics 2375 \Lyrics
2378 \override VerticalAxisGroup 2376 \override VerticalAxisGroup.nonstaff-nonstaff-spacing.stretchability = #1000
2379 #'nonstaff-nonstaff-spacing #'stretchability = #1000
2380 } 2377 }
2381 } 2378 }
2382 2379
2383 \new StaffGroup 2380 \new StaffGroup
2384 << 2381 <<
2385 \new Staff \with { 2382 \new Staff \with {
2386 \override VerticalAxisGroup #'staff-staff-spacing = #'((basic-distance . 30) ) 2383 \override VerticalAxisGroup.staff-staff-spacing = #'((basic-distance . 30))
2387 } { c'1 } 2384 } { c'1 }
2388 \new Lyrics \with { 2385 \new Lyrics \with {
2389 \override VerticalAxisGroup #'staff-affinity = #UP 2386 \override VerticalAxisGroup.staff-affinity = #UP
2390 } \lyricmode { up } 2387 } \lyricmode { up }
2391 \new Lyrics \with { 2388 \new Lyrics \with {
2392 \override VerticalAxisGroup #'staff-affinity = #CENTER 2389 \override VerticalAxisGroup.staff-affinity = #CENTER
2393 } \lyricmode { center } 2390 } \lyricmode { center }
2394 \new Lyrics \with { 2391 \new Lyrics \with {
2395 \override VerticalAxisGroup #'staff-affinity = #DOWN 2392 \override VerticalAxisGroup.staff-affinity = #DOWN
2396 } \lyricmode { down } 2393 } \lyricmode { down }
2397 \new Staff { c'1 } 2394 \new Staff { c'1 }
2398 >> 2395 >>
2399 @end lilypond 2396 @end lilypond
2400 2397
2401 @seealso 2398 @seealso
2402 Installed Files: 2399 Installed Files:
2403 @file{ly/engraver-init.ly}, 2400 @file{ly/engraver-init.ly},
2404 @file{scm/define-grobs.scm}. 2401 @file{scm/define-grobs.scm}.
2405 2402
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2448 When we override @code{NonMusicalPaperColumn}, we use the usual 2445 When we override @code{NonMusicalPaperColumn}, we use the usual
2449 @code{\override} command in @code{\context} blocks and in the 2446 @code{\override} command in @code{\context} blocks and in the
2450 @code{\with} block. On the other hand, when we override 2447 @code{\with} block. On the other hand, when we override
2451 @code{NonMusicalPaperColumn} in the middle of note entry, 2448 @code{NonMusicalPaperColumn} in the middle of note entry,
2452 use the special @code{\overrideProperty} command. Here are some 2449 use the special @code{\overrideProperty} command. Here are some
2453 example @code{NonMusicalPaperColumn} overrides with the special 2450 example @code{NonMusicalPaperColumn} overrides with the special
2454 @code{\overrideProperty} command: 2451 @code{\overrideProperty} command:
2455 2452
2456 @example 2453 @example
2457 \overrideProperty NonMusicalPaperColumn 2454 \overrideProperty NonMusicalPaperColumn
2458 #'line-break-system-details #'((X-offset . 20)) 2455 line-break-system-details #'((X-offset . 20))
2459 2456
2460 \overrideProperty NonMusicalPaperColumn 2457 \overrideProperty NonMusicalPaperColumn
2461 #'line-break-system-details #'((Y-offset . 40)) 2458 line-break-system-details #'((Y-offset . 40))
2462 2459
2463 \overrideProperty NonMusicalPaperColumn 2460 \overrideProperty NonMusicalPaperColumn
2464 #'line-break-system-details #'((X-offset . 20) 2461 line-break-system-details #'((X-offset . 20)
2465 (Y-offset . 40)) 2462 (Y-offset . 40))
2466 2463
2467 \overrideProperty NonMusicalPaperColumn 2464 \overrideProperty NonMusicalPaperColumn
2468 #'line-break-system-details #'((alignment-distances . (15))) 2465 line-break-system-details #'((alignment-distances . (15)))
2469 2466
2470 \overrideProperty NonMusicalPaperColumn 2467 \overrideProperty NonMusicalPaperColumn
2471 #'line-break-system-details #'((X-offset . 20) 2468 line-break-system-details #'((X-offset . 20)
2472 (Y-offset . 40) 2469 (Y-offset . 40)
2473 (alignment-distances . (15))) 2470 (alignment-distances . (15)))
2474 @end example 2471 @end example
2475 2472
2476 To understand how each of these different settings work, we begin 2473 To understand how each of these different settings work, we begin
2477 by looking at an example that includes no overrides at all. 2474 by looking at an example that includes no overrides at all.
2478 2475
2479 @c \book { } is required in these examples to ensure the spacing 2476 @c \book { } is required in these examples to ensure the spacing
2480 @c overrides can be seen between systems. -np 2477 @c overrides can be seen between systems. -np
2481 2478
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 attribute of the @code{NonMusicalPaperColumn} grob: 2510 attribute of the @code{NonMusicalPaperColumn} grob:
2514 2511
2515 @lilypond[verbatim,quote,staffsize=16] 2512 @lilypond[verbatim,quote,staffsize=16]
2516 \header { tagline = ##f } 2513 \header { tagline = ##f }
2517 \paper { left-margin = 0\mm } 2514 \paper { left-margin = 0\mm }
2518 \book { 2515 \book {
2519 \score { 2516 \score {
2520 << 2517 <<
2521 \new Staff << 2518 \new Staff <<
2522 \new Voice { 2519 \new Voice {
2523 \overrideProperty #"Score.NonMusicalPaperColumn" 2520 \overrideProperty Score.NonMusicalPaperColumn
2524 #'line-break-system-details #'((Y-offset . 0)) 2521 line-break-system-details #'((Y-offset . 0))
2525 s1*5 \break 2522 s1*5 \break
2526 \overrideProperty #"Score.NonMusicalPaperColumn" 2523 \overrideProperty Score.NonMusicalPaperColumn
2527 #'line-break-system-details #'((Y-offset . 40)) 2524 line-break-system-details #'((Y-offset . 40))
2528 s1*5 \break 2525 s1*5 \break
2529 \overrideProperty #"Score.NonMusicalPaperColumn" 2526 \overrideProperty Score.NonMusicalPaperColumn
2530 #'line-break-system-details #'((Y-offset . 80)) 2527 line-break-system-details #'((Y-offset . 80))
2531 s1*5 \break 2528 s1*5 \break
2532 } 2529 }
2533 \new Voice { \repeat unfold 15 { c'4 c' c' c' } } 2530 \new Voice { \repeat unfold 15 { c'4 c' c' c' } }
2534 >> 2531 >>
2535 \new Staff { 2532 \new Staff {
2536 \repeat unfold 15 { d'4 d' d' d' } 2533 \repeat unfold 15 { d'4 d' d' d' }
2537 } 2534 }
2538 >> 2535 >>
2539 } 2536 }
2540 } 2537 }
(...skipping 10 matching lines...) Expand all
2551 subproperty of @code{line-break-system-details}. 2548 subproperty of @code{line-break-system-details}.
2552 2549
2553 @lilypond[verbatim,quote,staffsize=16] 2550 @lilypond[verbatim,quote,staffsize=16]
2554 \header { tagline = ##f } 2551 \header { tagline = ##f }
2555 \paper { left-margin = 0\mm } 2552 \paper { left-margin = 0\mm }
2556 \book { 2553 \book {
2557 \score { 2554 \score {
2558 << 2555 <<
2559 \new Staff << 2556 \new Staff <<
2560 \new Voice { 2557 \new Voice {
2561 \overrideProperty #"Score.NonMusicalPaperColumn" 2558 \overrideProperty Score.NonMusicalPaperColumn
2562 #'line-break-system-details #'((Y-offset . 20) 2559 line-break-system-details #'((Y-offset . 20)
2563 (alignment-distances . (15))) 2560 (alignment-distances . (15)))
2564 s1*5 \break 2561 s1*5 \break
2565 \overrideProperty #"Score.NonMusicalPaperColumn" 2562 \overrideProperty Score.NonMusicalPaperColumn
2566 #'line-break-system-details #'((Y-offset . 60) 2563 line-break-system-details #'((Y-offset . 60)
2567 (alignment-distances . (15))) 2564 (alignment-distances . (15)))
2568 s1*5 \break 2565 s1*5 \break
2569 \overrideProperty #"Score.NonMusicalPaperColumn" 2566 \overrideProperty Score.NonMusicalPaperColumn
2570 #'line-break-system-details #'((Y-offset . 100) 2567 line-break-system-details #'((Y-offset . 100)
2571 (alignment-distances . (15))) 2568 (alignment-distances . (15)))
2572 s1*5 \break 2569 s1*5 \break
2573 } 2570 }
2574 \new Voice { \repeat unfold 15 { c'4 c' c' c' } } 2571 \new Voice { \repeat unfold 15 { c'4 c' c' c' } }
2575 >> 2572 >>
2576 \new Staff { 2573 \new Staff {
2577 \repeat unfold 15 { d'4 d' d' d' } 2574 \repeat unfold 15 { d'4 d' d' d' }
2578 } 2575 }
2579 >> 2576 >>
2580 } 2577 }
(...skipping 11 matching lines...) Expand all
2592 specifies the vertical positioning of staves but not of staff groups. 2589 specifies the vertical positioning of staves but not of staff groups.
2593 2590
2594 @lilypond[verbatim,quote,staffsize=16] 2591 @lilypond[verbatim,quote,staffsize=16]
2595 \header { tagline = ##f } 2592 \header { tagline = ##f }
2596 \paper { left-margin = 0\mm } 2593 \paper { left-margin = 0\mm }
2597 \book { 2594 \book {
2598 \score { 2595 \score {
2599 << 2596 <<
2600 \new Staff << 2597 \new Staff <<
2601 \new Voice { 2598 \new Voice {
2602 \overrideProperty #"Score.NonMusicalPaperColumn" 2599 \overrideProperty Score.NonMusicalPaperColumn
2603 #'line-break-system-details #'((Y-offset . 0) 2600 line-break-system-details #'((Y-offset . 0)
2604 (alignment-distances . (30 10))) 2601 (alignment-distances . (30 10)))
2605 s1*5 \break 2602 s1*5 \break
2606 \overrideProperty #"Score.NonMusicalPaperColumn" 2603 \overrideProperty Score.NonMusicalPaperColumn
2607 #'line-break-system-details #'((Y-offset . 60) 2604 line-break-system-details #'((Y-offset . 60)
2608 (alignment-distances . (10 10))) 2605 (alignment-distances . (10 10)))
2609 s1*5 \break 2606 s1*5 \break
2610 \overrideProperty #"Score.NonMusicalPaperColumn" 2607 \overrideProperty Score.NonMusicalPaperColumn
2611 #'line-break-system-details #'((Y-offset . 100) 2608 line-break-system-details #'((Y-offset . 100)
2612 (alignment-distances . (10 30))) 2609 (alignment-distances . (10 30)))
2613 s1*5 \break 2610 s1*5 \break
2614 } 2611 }
2615 \new Voice { \repeat unfold 15 { c'4 c' c' c' } } 2612 \new Voice { \repeat unfold 15 { c'4 c' c' c' } }
2616 >> 2613 >>
2617 \new StaffGroup << 2614 \new StaffGroup <<
2618 \new Staff { \repeat unfold 15 { d'4 d' d' d' } } 2615 \new Staff { \repeat unfold 15 { d'4 d' d' d' } }
2619 \new Staff { \repeat unfold 15 { e'4 e' e' e' } } 2616 \new Staff { \repeat unfold 15 { e'4 e' e' e' } }
2620 >> 2617 >>
2621 >> 2618 >>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2673 @code{outside-staff-priority} (in increasing order). One by one, LilyPond 2670 @code{outside-staff-priority} (in increasing order). One by one, LilyPond
2674 takes the outside-staff objects and places them so that they do 2671 takes the outside-staff objects and places them so that they do
2675 not collide with any objects that have already been placed. That 2672 not collide with any objects that have already been placed. That
2676 is, if two outside-staff grobs are competing for the same space, the one 2673 is, if two outside-staff grobs are competing for the same space, the one
2677 with the lower @code{outside-staff-priority} will be placed closer to 2674 with the lower @code{outside-staff-priority} will be placed closer to
2678 the staff. 2675 the staff.
2679 2676
2680 @lilypond[quote,ragged-right,relative=2,verbatim] 2677 @lilypond[quote,ragged-right,relative=2,verbatim]
2681 c4_"Text"\pp 2678 c4_"Text"\pp
2682 r2. 2679 r2.
2683 \once \override TextScript #'outside-staff-priority = #1 2680 \once \override TextScript.outside-staff-priority = #1
2684 c4_"Text"\pp % this time the text will be closer to the staff 2681 c4_"Text"\pp % this time the text will be closer to the staff
2685 r2. 2682 r2.
2686 % by setting outside-staff-priority to a non-number, 2683 % by setting outside-staff-priority to a non-number,
2687 % we disable the automatic collision avoidance 2684 % we disable the automatic collision avoidance
2688 \once \override TextScript #'outside-staff-priority = ##f 2685 \once \override TextScript.outside-staff-priority = ##f
2689 \once \override DynamicLineSpanner #'outside-staff-priority = ##f 2686 \once \override DynamicLineSpanner.outside-staff-priority = ##f
2690 c4_"Text"\pp % now they will collide 2687 c4_"Text"\pp % now they will collide
2691 @end lilypond 2688 @end lilypond
2692 2689
2693 The vertical padding between an outside-staff object and the 2690 The vertical padding between an outside-staff object and the
2694 previously-positioned grobs can be controlled with 2691 previously-positioned grobs can be controlled with
2695 @code{outside-staff-padding}. 2692 @code{outside-staff-padding}.
2696 2693
2697 @lilypond[quote,ragged-right,relative=2,verbatim,staffsize=18] 2694 @lilypond[quote,ragged-right,relative=2,verbatim,staffsize=18]
2698 \once \override TextScript #'outside-staff-padding = #0 2695 \once \override TextScript.outside-staff-padding = #0
2699 a'^"This text is placed very close to the note" 2696 a'^"This text is placed very close to the note"
2700 \once \override TextScript #'outside-staff-padding = #3 2697 \once \override TextScript.outside-staff-padding = #3
2701 c^"This text is padded away from the previous text" 2698 c^"This text is padded away from the previous text"
2702 c^"This text is placed close to the previous text" 2699 c^"This text is placed close to the previous text"
2703 @end lilypond 2700 @end lilypond
2704 2701
2705 2702
2706 By default, outside-staff objects are placed only to avoid 2703 By default, outside-staff objects are placed only to avoid
2707 a horizontal collision with previously-positioned grobs. This 2704 a horizontal collision with previously-positioned grobs. This
2708 can lead to situations in which objects are placed very close to each 2705 can lead to situations in which objects are placed very close to each
2709 other horizontally. The vertical spacing between staves can 2706 other horizontally. The vertical spacing between staves can
2710 also be set so that outside staff objects are interleaved. 2707 also be set so that outside staff objects are interleaved.
2711 Setting @code{outside-staff-horizontal-padding} 2708 Setting @code{outside-staff-horizontal-padding}
2712 causes an object to be offset vertically so that such a situation 2709 causes an object to be offset vertically so that such a situation
2713 doesn't occur. 2710 doesn't occur.
2714 2711
2715 @lilypond[quote,ragged-right,relative=2,verbatim] 2712 @lilypond[quote,ragged-right,relative=2,verbatim]
2716 % the markup is too close to the following note 2713 % the markup is too close to the following note
2717 c4^"Text" 2714 c4^"Text"
2718 c4 2715 c4
2719 c''2 2716 c''2
2720 % setting outside-staff-horizontal-padding fixes this 2717 % setting outside-staff-horizontal-padding fixes this
2721 R1 2718 R1
2722 \once \override TextScript #'outside-staff-horizontal-padding = #1 2719 \once \override TextScript.outside-staff-horizontal-padding = #1
2723 c,,4^"Text" 2720 c,,4^"Text"
2724 c4 2721 c4
2725 c''2 2722 c''2
2726 @end lilypond 2723 @end lilypond
2727 2724
2728 @seealso 2725 @seealso
2729 Snippets: 2726 Snippets:
2730 @rlsr{Spacing}. 2727 @rlsr{Spacing}.
2731 2728
2732 2729
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
2817 @rinternals{Voice} context. The @code{StaffSpacing} object 2814 @rinternals{Voice} context. The @code{StaffSpacing} object
2818 (generated in @rinternals{Staff} context) contains the same 2815 (generated in @rinternals{Staff} context) contains the same
2819 property for controlling the stem/bar line spacing. The following 2816 property for controlling the stem/bar line spacing. The following
2820 example shows these corrections, once with default settings, and 2817 example shows these corrections, once with default settings, and
2821 once with exaggerated corrections: 2818 once with exaggerated corrections:
2822 2819
2823 @lilypond[quote,ragged-right] 2820 @lilypond[quote,ragged-right]
2824 { 2821 {
2825 c'4 e''4 e'4 b'4 | 2822 c'4 e''4 e'4 b'4 |
2826 b'4 e''4 b'4 e''4 | 2823 b'4 e''4 b'4 e''4 |
2827 \override Staff.NoteSpacing #'stem-spacing-correction = #1.5 2824 \override Staff.NoteSpacing.stem-spacing-correction = #1.5
2828 \override Staff.StaffSpacing #'stem-spacing-correction = #1.5 2825 \override Staff.StaffSpacing.stem-spacing-correction = #1.5
2829 c'4 e''4 e'4 b'4 | 2826 c'4 e''4 e'4 b'4 |
2830 b'4 e''4 b'4 e''4 | 2827 b'4 e''4 b'4 e''4 |
2831 } 2828 }
2832 @end lilypond 2829 @end lilypond
2833 2830
2834 Proportional notation is supported; see @ref{Proportional notation}. 2831 Proportional notation is supported; see @ref{Proportional notation}.
2835 2832
2836 @seealso 2833 @seealso
2837 Essay on automated music engraving: 2834 Essay on automated music engraving:
2838 @ressay{Optical spacing}. 2835 @ressay{Optical spacing}.
2839 2836
2840 Snippets: 2837 Snippets:
2841 @rlsr{Spacing}. 2838 @rlsr{Spacing}.
2842 2839
2843 Internals Reference: 2840 Internals Reference:
2844 @rinternals{SpacingSpanner}, 2841 @rinternals{SpacingSpanner},
2845 @rinternals{NoteSpacing}, 2842 @rinternals{NoteSpacing},
2846 @rinternals{StaffSpacing}, 2843 @rinternals{StaffSpacing},
2847 @rinternals{NonMusicalPaperColumn}. 2844 @rinternals{NonMusicalPaperColumn}.
2848 2845
2849 @knownissues 2846 @knownissues
2850 There is no convenient mechanism to manually override spacing. The 2847 There is no convenient mechanism to manually override spacing. The
2851 following work-around may be used to insert extra space into a score, 2848 following work-around may be used to insert extra space into a score,
2852 adjusting the padding value as necessary. 2849 adjusting the padding value as necessary.
2853 2850
2854 @example 2851 @example
2855 \override Score.NonMusicalPaperColumn #'padding = #10 2852 \override Score.NonMusicalPaperColumn.padding = #10
2856 @end example 2853 @end example
2857 2854
2858 No work-around exists for decreasing the amount of space. 2855 No work-around exists for decreasing the amount of space.
2859 2856
2860 2857
2861 @node New spacing area 2858 @node New spacing area
2862 @subsection New spacing area 2859 @subsection New spacing area
2863 2860
2864 New sections with different spacing parameters can be started with 2861 New sections with different spacing parameters can be started with
2865 @code{newSpacingSection}. This is useful when there are 2862 @code{newSpacingSection}. This is useful when there are
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2916 \score { 2913 \score {
2917 \relative c'' { 2914 \relative c'' {
2918 g4 e e2 | f4 d d2 | c4 d e f | g4 g g2 | 2915 g4 e e2 | f4 d d2 | c4 d e f | g4 g g2 |
2919 g4 e e2 | f4 d d2 | c4 e g g | c,1 | 2916 g4 e e2 | f4 d d2 | c4 e g g | c,1 |
2920 d4 d d d | d4 e f2 | e4 e e e | e4 f g2 | 2917 d4 d d d | d4 e f2 | e4 e e e | e4 f g2 |
2921 g4 e e2 | f4 d d2 | c4 e g g | c,1 | 2918 g4 e e2 | f4 d d2 | c4 e g g | c,1 |
2922 } 2919 }
2923 \layout { 2920 \layout {
2924 \context { 2921 \context {
2925 \Score 2922 \Score
2926 \override SpacingSpanner 2923 \override SpacingSpanner.base-shortest-duration = #(ly:make-moment 1 16)
2927 #'base-shortest-duration = #(ly:make-moment 1 16)
2928 } 2924 }
2929 } 2925 }
2930 } 2926 }
2931 @end lilypond 2927 @end lilypond
2932 2928
2933 2929
2934 @snippets 2930 @snippets
2935 2931
2936 By default, spacing in tuplets depends on various non-duration 2932 By default, spacing in tuplets depends on various non-duration
2937 factors (such as accidentals, clef changes, etc). To disregard 2933 factors (such as accidentals, clef changes, etc). To disregard
(...skipping 13 matching lines...) Expand all
2951 \new Staff { 2947 \new Staff {
2952 c8 c8 c8 c8 2948 c8 c8 c8 c8
2953 \times 4/5 { 2949 \times 4/5 {
2954 c8 c8 c8 c8 c8 2950 c8 c8 c8 c8 c8
2955 } 2951 }
2956 } 2952 }
2957 >> 2953 >>
2958 \layout { 2954 \layout {
2959 \context { 2955 \context {
2960 \Score 2956 \Score
2961 \override SpacingSpanner #'uniform-stretching = ##t 2957 \override SpacingSpanner.uniform-stretching = ##t
2962 } 2958 }
2963 } 2959 }
2964 } 2960 }
2965 @end lilypond 2961 @end lilypond
2966 2962
2967 When @code{strict-note-spacing} is set, notes are spaced without 2963 When @code{strict-note-spacing} is set, notes are spaced without
2968 regard for clefs, bar lines, and grace notes, 2964 regard for clefs, bar lines, and grace notes,
2969 2965
2970 @lilypond[quote,ragged-right,relative=2,verbatim] 2966 @lilypond[quote,ragged-right,relative=2,verbatim]
2971 \override Score.SpacingSpanner #'strict-note-spacing = ##t 2967 \override Score.SpacingSpanner.strict-note-spacing = ##t
2972 \new Staff { c8[ c \clef alto c \grace { c16[ c] } c8 c c] c32[ c32] } 2968 \new Staff { c8[ c \clef alto c \grace { c16[ c] } c8 c c] c32[ c32] }
2973 @end lilypond 2969 @end lilypond
2974 2970
2975 @seealso 2971 @seealso
2976 Snippets: 2972 Snippets:
2977 @rlsr{Spacing}. 2973 @rlsr{Spacing}.
2978 2974
2979 2975
2980 @node Line length 2976 @node Line length
2981 @subsection Line length 2977 @subsection Line length
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
3042 of timelines or other graphics directly in the score. 3038 of timelines or other graphics directly in the score.
3043 3039
3044 LilyPond supports five different settings for proportional notation, 3040 LilyPond supports five different settings for proportional notation,
3045 which may be used together or alone: 3041 which may be used together or alone:
3046 3042
3047 @itemize 3043 @itemize
3048 @item @code{proportionalNotationDuration} 3044 @item @code{proportionalNotationDuration}
3049 @item @code{uniform-stretching} 3045 @item @code{uniform-stretching}
3050 @item @code{strict-note-spacing} 3046 @item @code{strict-note-spacing}
3051 @item @code{\remove "Separating_line_group_engraver"} 3047 @item @code{\remove "Separating_line_group_engraver"}
3052 @item @code{\override PaperColumn #'used = ##t} 3048 @item @code{\override PaperColumn.used = ##t}
3053 @end itemize 3049 @end itemize
3054 3050
3055 In the examples that follow, we explore these five different 3051 In the examples that follow, we explore these five different
3056 proportional notation settings and examine how these settings interact. 3052 proportional notation settings and examine how these settings interact.
3057 3053
3058 We start with the following one-measure example, which uses classical 3054 We start with the following one-measure example, which uses classical
3059 spacing with ragged-right turned on. 3055 spacing with ragged-right turned on.
3060 3056
3061 @lilypond[quote,verbatim,ragged-right] 3057 @lilypond[quote,verbatim,ragged-right]
3062 \score { 3058 \score {
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
3271 \new RhythmicStaff { 3267 \new RhythmicStaff {
3272 \times 8/9 { 3268 \times 8/9 {
3273 c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8 3269 c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8
3274 } 3270 }
3275 } 3271 }
3276 >> 3272 >>
3277 \layout { 3273 \layout {
3278 \context { 3274 \context {
3279 \Score 3275 \Score
3280 proportionalNotationDuration = #(ly:make-moment 1 20) 3276 proportionalNotationDuration = #(ly:make-moment 1 20)
3281 \override SpacingSpanner #'uniform-stretching = ##t 3277 \override SpacingSpanner.uniform-stretching = ##t
3282 } 3278 }
3283 } 3279 }
3284 } 3280 }
3285 @end lilypond 3281 @end lilypond
3286 3282
3287 Our two-staff example now spaces exactly, our rhythmic 3283 Our two-staff example now spaces exactly, our rhythmic
3288 relationships are visually clear, and we can include a measured 3284 relationships are visually clear, and we can include a measured
3289 timeline or graphic if we want. 3285 timeline or graphic if we want.
3290 3286
3291 Note that the LilyPond's proportional notation package expects 3287 Note that the LilyPond's proportional notation package expects
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
3370 c''8 3366 c''8
3371 c''8 3367 c''8
3372 c''8 3368 c''8
3373 \clef alto 3369 \clef alto
3374 d'8 3370 d'8
3375 d'2 3371 d'2
3376 } 3372 }
3377 3373
3378 \new Staff { 3374 \new Staff {
3379 \set Score.proportionalNotationDuration = #(ly:make-moment 1 16) 3375 \set Score.proportionalNotationDuration = #(ly:make-moment 1 16)
3380 \override Score.SpacingSpanner #'strict-note-spacing = ##t 3376 \override Score.SpacingSpanner.strict-note-spacing = ##t
3381 c''8 3377 c''8
3382 c''8 3378 c''8
3383 c''8 3379 c''8
3384 \clef alto 3380 \clef alto
3385 d'8 3381 d'8
3386 d'2 3382 d'2
3387 } 3383 }
3388 @end lilypond 3384 @end lilypond
3389 3385
3390 Both scores are proportional, but the spacing in the first score 3386 Both scores are proportional, but the spacing in the first score
3391 is too loose because of the clef change. The spacing of the second 3387 is too loose because of the clef change. The spacing of the second
3392 score remains strict, however, because strict-note-spacing is 3388 score remains strict, however, because strict-note-spacing is
3393 turned on. Turning on strict-note-spacing causes the width of 3389 turned on. Turning on strict-note-spacing causes the width of
3394 time signatures, key signatures, clefs and accidentals to play no 3390 time signatures, key signatures, clefs and accidentals to play no
3395 part in the spacing algorithm. 3391 part in the spacing algorithm.
3396 3392
3397 In addition to the settings given here, there are other settings 3393 In addition to the settings given here, there are other settings
3398 that frequently appear in proportional scores. These include: 3394 that frequently appear in proportional scores. These include:
3399 3395
3400 @itemize 3396 @itemize
3401 @item @code{\override SpacingSpanner #'strict-grace-spacing = ##t} 3397 @item @code{\override SpacingSpanner.strict-grace-spacing = ##t}
3402 @item @code{tupletFullLength = ##t} 3398 @item @code{tupletFullLength = ##t}
3403 @item @code{\override Beam #'breakable = ##t} 3399 @item @code{\override Beam.breakable = ##t}
3404 @item @code{\override Glissando #'breakable = ##t} 3400 @item @code{\override Glissando.breakable = ##t}
3405 @item @code{\override TextSpanner #'breakable = ##t} 3401 @item @code{\override TextSpanner.breakable = ##t}
3406 @item @code{\remove "Forbid_line_break_engraver" in the Voice context} 3402 @item @code{\remove "Forbid_line_break_engraver" in the Voice context}
3407 @end itemize 3403 @end itemize
3408 3404
3409 These settings space grace notes strictly, extend tuplet brackets to 3405 These settings space grace notes strictly, extend tuplet brackets to
3410 mark both rhythmic start- and stop-points, and allow spanning elements 3406 mark both rhythmic start- and stop-points, and allow spanning elements
3411 to break across systems and pages. See the respective parts of the manual 3407 to break across systems and pages. See the respective parts of the manual
3412 for these related settings. 3408 for these related settings.
3413 3409
3414 @seealso 3410 @seealso
3415 Notation Reference: 3411 Notation Reference:
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
3545 @item 3541 @item
3546 Avoid (or reduce) objects that increase the vertical size of a 3542 Avoid (or reduce) objects that increase the vertical size of a
3547 system. For example, volta repeats (or alternate repeats) require 3543 system. For example, volta repeats (or alternate repeats) require
3548 extra space. If these repeats are spread over two systems, they 3544 extra space. If these repeats are spread over two systems, they
3549 will take up more space than one system with the volta repeats and 3545 will take up more space than one system with the volta repeats and
3550 another system without. For example, dynamics that @q{stick out} of 3546 another system without. For example, dynamics that @q{stick out} of
3551 a system can be moved closer to the staff: 3547 a system can be moved closer to the staff:
3552 3548
3553 @lilypond[verbatim,quote,relative=1] 3549 @lilypond[verbatim,quote,relative=1]
3554 e4 c g\f c 3550 e4 c g\f c
3555 e4 c g-\tweak #'X-offset #-2.7 -\tweak #'Y-offset #2.5 \f c 3551 e4 c g-\tweak X-offset #-2.7 -\tweak Y-offset #2.5 \f c
3556 @end lilypond 3552 @end lilypond
3557 3553
3558 @item 3554 @item
3559 Alter the horizontal spacing via @code{SpacingSpanner}. For more 3555 Alter the horizontal spacing via @code{SpacingSpanner}. For more
3560 details, see @ref{Changing horizontal spacing}. The following 3556 details, see @ref{Changing horizontal spacing}. The following
3561 example illustrates the default spacing: 3557 example illustrates the default spacing:
3562 3558
3563 @lilypond[verbatim,quote] 3559 @lilypond[verbatim,quote]
3564 \score { 3560 \score {
3565 \relative c'' { 3561 \relative c'' {
(...skipping 17 matching lines...) Expand all
3583 \relative c'' { 3579 \relative c'' {
3584 g4 e e2 | 3580 g4 e e2 |
3585 f4 d d2 | 3581 f4 d d2 |
3586 c4 d e f | 3582 c4 d e f |
3587 g4 g g2 | 3583 g4 g g2 |
3588 g4 e e2 | 3584 g4 e e2 |
3589 } 3585 }
3590 \layout { 3586 \layout {
3591 \context { 3587 \context {
3592 \Score 3588 \Score
3593 \override SpacingSpanner 3589 \override SpacingSpanner.common-shortest-duration = #(ly:make-moment 1 2)
3594 #'common-shortest-duration = #(ly:make-moment 1 2)
3595 } 3590 }
3596 } 3591 }
3597 } 3592 }
3598 @end lilypond 3593 @end lilypond
3599 3594
3600 @noindent 3595 @noindent
3601 The @code{common-shortest-duration} property cannot be modified 3596 The @code{common-shortest-duration} property cannot be modified
3602 dynamically, so it must always be placed in a @code{\context} 3597 dynamically, so it must always be placed in a @code{\context}
3603 block so that it applies to the whole score. 3598 block so that it applies to the whole score.
3604 3599
3605 @end itemize 3600 @end itemize
3606 3601
3607 @seealso 3602 @seealso
3608 Notation Reference: 3603 Notation Reference:
3609 @ref{Page layout}, 3604 @ref{Page layout},
3610 @ref{Changing horizontal spacing}. 3605 @ref{Changing horizontal spacing}.
3611 3606
3612 Snippets: 3607 Snippets:
3613 @rlsr{Spacing}. 3608 @rlsr{Spacing}.
OLDNEW
« no previous file with comments | « Documentation/notation/simultaneous.itely ('k') | Documentation/notation/staff.itely » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b