]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/printing-bar-numbers-at-regular-intervals.ly
Merge remote-tracking branch 'origin/master' into translation
[lilypond.git] / Documentation / snippets / printing-bar-numbers-at-regular-intervals.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.18.0"
8
9 \header {
10   lsrtags = "rhythms"
11
12   texidoc = "
13 Bar numbers can be printed at regular intervals by setting the property
14 @code{barNumberVisibility}. Here the bar numbers are printed every two
15 measures except at the end of the line.
16
17 "
18   doctitle = "Printing bar numbers at regular intervals"
19 } % begin verbatim
20
21 \relative c' {
22   \override Score.BarNumber.break-visibility = #end-of-line-invisible
23   \set Score.currentBarNumber = #11
24   % Permit first bar number to be printed
25   \bar ""
26   % Print a bar number every second measure
27   \set Score.barNumberVisibility = #(every-nth-bar-number-visible 2)
28   c1 | c | c | c | c
29   \break
30   c1 | c | c | c | c
31 }