number itself is stored in the @code{currentBarNumber} property, which
is normally updated automatically for every measure.
-To manually set a bar number, use
-
-@example
-\set Score.currentBarNumber = #57
-@end example
-
Bar numbers can be typeset at regular intervals instead of at the
beginning of each line. This is illustrated in the following example,
whose source is available as
@lilypondfile[ragged-right,quote]{bar-number-regular-interval.ly}
-Bar numbers can be typeset manually by tweaking the
-@code{markFormatter} property
-
-@lilypond[verbatim,ragged-right,quote]
-\relative c' {
- \set Score.markFormatter
- = #(lambda (mark context)
- (make-bold-markup
- (make-box-markup
- (number->string (ly:context-property context
- 'currentBarNumber)))))
-
- c1 \bar "||" \mark \default c1 c1 \mark \default c1 \bar "|."
-}
-@end lilypond
-
Bar numbers can be manually changed by setting the
@code{Staff.currentBarNumber} property
Bar numbers can be removed entirely by removing the Bar number
engraver from the score.
-@lilypond[verbatim,ragged-right,quote,relative=2]
+@lilypond[verbatim,ragged-right,quote]
\layout {
\context {
\Score
\remove "Bar_number_engraver"
}
}
-{
+\relative c''{
c4 c c c \break
c4 c c c
}
@afourpaper
@end iftex
+@c Keep this here, since it pertains to the direntry below.
+@ignore
+Distributions will want to install lilypond.info in postinstall, doing:
+
+ install-info --info-dir=/usr/share/info out/lilypond.info
+
+ * Prepend GNU for dir, must be unique.
+
+ * Do not list the `lilypond' node at toplevel, so that `info lilypond'
+ goes to Top.
+
+ * List all commands in direntry.
+
+@c * lilypond: (lilypond/lilypond)Running LilyPond. Invoking the
+@c LilyPond program.
+@end ignore
+
@dircategory GNU music project
@direntry
* LilyPond: (lilypond/lilypond). The GNU music typesetter.
common objects.
@multitable @columnfractions .33 .66
-@headitem Object type @tab Object name
-@item Text @tab @code{TextScript}
-@item Dynamics @tab @code{DynamicLineSpanner}
-@item Ties @tab @code{Tie}
-@item Slurs @tab @code{Slur}
-@item Articulation @tab @code{Script}
-@item Fingering @tab @code{Fingering}
-@item Rehearsal marks @tab @code{RehearsalMark}
+@headitem Object type @tab Object name
+@item Dynamics @tab @code{DynamicLineSpanner}
+@item Ties @tab @code{Tie}
+@item Slurs @tab @code{Slur}
+@item Articulations @tab @code{Script}
+@item Fingerings @tab @code{Fingering}
+@item Text e.g. @code{^"text"} @tab @code{TextScript}
+@item Rehearsal / Text marks @tab @code{RehearsalMark}
@end multitable
We can use it to create new commands,
@lilypond[quote,verbatim,ragged-right]
-tempoMark = #(define-music-function
- (parser location marktext padding) (string? number?)
+tempoMark = #(define-music-function (parser location padding marktext)
+ (number? string?)
#{
\once \override Score . RehearsalMark #'padding = $padding
\once \override Score . RehearsalMark #'no-spacing-rods = ##t
\relative c'' {
c2 e
-\tempoMark #"Allegro" #3.0
+\tempoMark #3.0 #"Allegro"
g c
}
@end lilypond