int(0) array(11) { [0]=> string(44) "Running as unit: run-p323580-i323581.service" [1]=> string(60) "Changing working directory to: `/tmp/lilywiki-tmp15b5372049'" [2]=> string(48) "Processing `/tmp/lilywiki-tmp15b5372049/file.ly'" [3]=> string(10) "Parsing..." [4]=> string(24) "Interpreting music...[8]" [5]=> string(34) "Preprocessing graphical objects..." [6]=> string(36) "Finding the ideal number of pages..." [7]=> string(26) "Fitting music on 1 page..." [8]=> string(18) "Drawing systems..." [9]=> string(30) "Layout output to `file.svg'..." [10]=> string(43) "Success: compilation successfully completed" } Printing bar numbers inside boxes or circles - LilyPond wiki Jump to content

Printing bar numbers inside boxes or circles

From LilyPond wiki

Bar numbers can also be printed inside boxes or circles.

\version "2.24.0"

\relative c' {
  % Prevent bar numbers at the end of a line and permit them elsewhere
  \override Score.BarNumber.break-visibility = #end-of-line-invisible
  \set Score.barNumberVisibility = #(every-nth-bar-number-visible 4)

  % Increase the size of the bar number by 2
  \override Score.BarNumber.font-size = 2

  % 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 5 { c1 }

  % 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 "|."
}