c1 c c c
@end lilypond
-
-@snippets
-
@cindex bar numbers, regular spacing
@funindex barNumberVisibility
-@c Uncomment this after next LSR update.
-@c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
-@c {printing-the-bar-number-for-the-first-measure.ly}
-
Bar numbers can be typeset at regular intervals instead of just at
the beginning of every line. To do this the default behavior
must be overridden to permit bar numbers to be printed at places
@lilypond[verbatim,quote,relative=1]
\override Score.BarNumber #'break-visibility = #'#(#t #t #t)
\set Score.currentBarNumber = #11
-\bar "" % Permit first bar number to be printed
-c1 c c c
+% Permit first bar number to be printed
+\bar ""
+c1 | c | c | c
\break
-c c c c
+c1 | c | c | c
@end lilypond
-@c All the rest of these examples will be added to LSR
-@c and moved into the Snippets. -gp
-@noindent
-and here the bar numbers are printed every two measures
-except at the end of the line:
+@snippets
-@lilypond[verbatim,quote,relative=1]
-\override Score.BarNumber #'break-visibility = #'#(#f #t #t)
-\set Score.currentBarNumber = #11
-\bar "" % Permit first bar number to be printed
-% Print a bar number every second measure
-\set Score.barNumberVisibility = #(every-nth-bar-number-visible 2)
-c1 c c c c
-\break
-c c c c c
-@end lilypond
+@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
+{printing-the-bar-number-for-the-first-measure.ly}
+
+@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
+{printing-bar-numbers-at-regular-intervals.ly}
@cindex measure number, format
@cindex bar number, format
-The size of the bar number may be changed. This is illustrated
-in the following example, which also shows how to enclose bar
-numbers in boxes and circles, and shows an alternative way
-of specifying @code{#(#f #t #t)} for @code{break-visibility}.
-
-@lilypond[verbatim,quote,relative=1]
-% Prevent bar numbers at the end of a line and permit them elsewhere
-\override Score.BarNumber #'break-visibility
- = #end-of-line-invisible
-
-% Increase the size of the bar number by 2
-\override Score.BarNumber #'font-size = #2
-\repeat unfold 3 { c1 } \bar "|"
-
-% Draw a box round the following bar number(s)
-\override Score.BarNumber #'stencil
- = #(make-stencil-boxer 0.1 0.25 ly:text-interface::print)
-\repeat unfold 3 { c1 } \bar "|"
-
-% Draw a circle round the following bar number(s)
-\override Score.BarNumber #'stencil
- = #(make-stencil-circler 0.1 0.25 ly:text-interface::print)
-\repeat unfold 4 { c1 } \bar "|."
-@end lilypond
+@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
+{printing-bar-numbers-inside-boxes-or-circles.ly}
@cindex bar number alignment
-Bar numbers by default are left-aligned to their parent object.
-This is usually the left edge of a line or, if numbers are printed
-within a line, the left bar line of the measure. The numbers may also
-be positioned directly on the bar line or right-aligned to the
-bar line:
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
+{aligning-bar-numbers.ly}
-@lilypond[verbatim,quote,relative=1]
-\set Score.currentBarNumber = #111
-\override Score.BarNumber #'break-visibility = #'#(#t #t #t)
-% Increase the size of the bar number by 2
-\override Score.BarNumber #'font-size = #2
-% Print a bar number every second measure
-\set Score.barNumberVisibility = #(every-nth-bar-number-visible 2)
-c1 c1
-% Center-align bar numbers
-\override Score.BarNumber #'self-alignment-X = #0
-c1 c1
-% Right-align bar numbers
-\override Score.BarNumber #'self-alignment-X = #-1
-c1 c1
-@end lilypond
-
-Bar numbers can be removed entirely by removing the
-@code{Bar_number_engraver} from the @code{Score} context.
-
-@lilypond[verbatim,quote]
-\layout {
- \context {
- \Score
- \remove "Bar_number_engraver"
- }
-}
-\relative c''{
- c4 c c c \break
- c4 c c c
-}
-@end lilypond
+@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
+{removing-bar-numbers-from-a-score.ly}
@seealso
@snippets
-The slash through the stem found in @emph{acciaccatura}s can be applied
-in other situations:
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
+{using-grace-note-slashes-with-normal-heads.ly}
-@lilypond[quote,verbatim,relative=2]
-\relative c'' {
- \override Stem #'stroke-style = #"grace"
- c8( d2) e8( f4)
-}
-@end lilypond
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
+{tweaking-grace-layout-within-music.ly}
-The layout of grace expressions can be changed throughout the
-music using the function @code{add-grace-property}. The following
-example undefines the @code{Stem} direction for this grace, so
-that stems do not always point up.
-
-@lilypond[quote,verbatim,relative=2]
-\relative c'' {
- \new Staff {
- #(add-grace-property 'Voice 'Stem 'direction ly:stem::calc-direction)
- #(remove-grace-property 'Voice 'Stem 'direction)
- \new Voice {
- \acciaccatura { f16 } g4
- \grace { d16[ e] } f4
- \appoggiatura { a,32[ b c d] } e2
- }
- }
-}
-@end lilypond
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
+{redefining-grace-note-global-defaults.ly}
-Another option is to change the variables @code{startGraceMusic},
-@code{stopGraceMusic}, @code{startAcciaccaturaMusic},
-@code{stopAcciaccaturaMusic}, @code{startAppoggiaturaMusic},
-@code{stopAppoggiaturaMusic}. The default values of these can be
-seen in the file @code{ly/@/grace@/-init@/.ly}. By redefining
-them other effects may be obtained.
-
-Grace notes may be forced to align with regular notes
-in other staves:
-
-@lilypond[verbatim,quote]
-\relative c'' {
- <<
- \override Score.SpacingSpanner #'strict-grace-spacing = ##t
- \new Staff {
- c4
- \afterGrace c4 { c16[ c8 c16] }
- c4 r
- }
- \new Staff {
- c16 c c c c c c c c4 r
- }
- >>
-}
-@end lilypond
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
+{positioning-grace-notes-with-floating-space.ly}
@seealso
staves without, for example,
@lilypond[quote,relative=2,verbatim]
-<< \new Staff { e4 \bar "|:" \grace c16 d2. }
- \new Staff { c4 \bar "|:" d2. } >>
+<<
+ \new Staff { e4 \bar "|:" \grace c16 d2. }
+ \new Staff { c4 \bar "|:" d2. }
+>>
@end lilypond
@noindent
durations in the other staves. For the above example
@lilypond[quote,relative=2,verbatim]
-<< \new Staff { e4 \bar "|:" \grace c16 d2. }
- \new Staff { c4 \bar "|:" \grace s16 d2. } >>
+<<
+ \new Staff { e4 \bar "|:" \grace c16 d2. }
+ \new Staff { c4 \bar "|:" \grace s16 d2. }
+>>
@end lilypond
Grace sections should only be used within sequential music