]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/printing-bar-numbers-inside-boxes-or-circles.ly
Update snippets from today's LSR with changed makelsr.py
[lilypond.git] / Documentation / snippets / printing-bar-numbers-inside-boxes-or-circles.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.14.2"
8
9 \header {
10   lsrtags = "rhythms, tweaks-and-overrides"
11
12   texidoc = "
13 Bar numbers can also be printed inside boxes or circles.
14
15 "
16   doctitle = "Printing bar numbers inside boxes or circles"
17 } % begin verbatim
18
19
20 \relative c' {
21   % Prevent bar numbers at the end of a line and permit them elsewhere
22   \override Score.BarNumber #'break-visibility = #end-of-line-invisible
23   \set Score.barNumberVisibility = #(every-nth-bar-number-visible 4)
24
25   % Increase the size of the bar number by 2
26   \override Score.BarNumber #'font-size = #2
27
28   % Draw a box round the following bar number(s)
29   \override Score.BarNumber #'stencil
30     = #(make-stencil-boxer 0.1 0.25 ly:text-interface::print)
31   \repeat unfold 5 { c1 }
32
33   % Draw a circle round the following bar number(s)
34   \override Score.BarNumber #'stencil
35     = #(make-stencil-circler 0.1 0.25 ly:text-interface::print)
36   \repeat unfold 4 { c1 } \bar "|."
37 }