Jump to content

Printing bar numbers with changing regular intervals: Difference between revisions

From LilyPond wiki
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Using the <code>set-bar-number-visibility</code> context function, bar number intervals can be changed.
Using the <code>set-bar-number-visibility</code> context function, bar number intervals can be changed.


<lilypond version="2.24" full>
<lilypond version="2.24">
\relative c' {
\relative c' {
   \override Score.BarNumber.break-visibility = #end-of-line-invisible
   \override Score.BarNumber.break-visibility = #end-of-line-invisible
Line 9: Line 9:
   \repeat unfold 10 c
   \repeat unfold 10 c
}
}
\paper { tagline = ##f }
</lilypond>
</lilypond>


[[Category:Rhythms]]
[[Category:Rhythms]]
[[Category:Text]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]

Latest revision as of 15:48, 30 November 2025

Using the set-bar-number-visibility context function, bar number intervals can be changed.

\version "2.24"

\relative c' {
  \override Score.BarNumber.break-visibility = #end-of-line-invisible
  \context Score \applyContext #(set-bar-number-visibility 4)
  \repeat unfold 10 c'1
  \context Score \applyContext #(set-bar-number-visibility 2)
  \repeat unfold 10 c
}