%% DO NOT EDIT this file manually; it was automatically
%% generated from the LilyPond Wiki
%% (https://wiki.lilypond.community).
%%
%% Make any changes in the Wiki itself, or in
%% `Documentation/snippets/new/`, then run
%% `scripts/auxiliar/makelsr.pl`.
%%
%% This file is in the public domain.

\version "2.24.0"

\header {
  categories = "Rhythms"

  texidoc = "
If the remainder of the division of the current bar number by the first
argument of @code{modulo-bar-number-visible} equals its second
argument, print a bar number.

This is useful to print the bar number at certain distances. Some
examples:

@itemize
@item
@code{(modulo-bar-number-visible 3 2)} → prints 2, 5, 8, ...
@item
@code{(modulo-bar-number-visible 4 2)} → prints 2, 6, 10, ...
@item
@code{(modulo-bar-number-visible 2 1)} → prints 3, 5, 7, ...
@item
@code{(modulo-bar-number-visible 5 0)} → prints 5, 10, 15, ...
@end itemize
"

  doctitle = "Printing bar numbers using modulo-bar-number-visible"
} % begin verbatim


\layout {
  \context {
    \Score
    \override BarNumber.break-visibility = ##(#f #t #t)
    barNumberVisibility = #(modulo-bar-number-visible 5 0)
  }
}

\relative c' {
  c1 | d | e | f \break
  g1 | e | d | c
}
