]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/printing-bar-numbers-at-regular-intervals.ly
Merge branch 'stable/2.16' into staging
[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.dsi.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.16.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
22 \relative c' {
23   \override Score.BarNumber #'break-visibility = #end-of-line-invisible
24   \set Score.currentBarNumber = #11
25   % Permit first bar number to be printed
26   \bar ""
27   % Print a bar number every second measure
28   \set Score.barNumberVisibility = #(every-nth-bar-number-visible 2)
29   c1 | c | c | c | c
30   \break
31   c1 | c | c | c | c
32 }