]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/centered-measure-numbers.ly
Merge remote-tracking branch 'origin/master' into translation
[lilypond.git] / Documentation / snippets / centered-measure-numbers.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 = "contexts-and-engravers, repeats, staff-notation"
11
12   texidoc = "
13 Scores of large ensemble works often have bar numbers placed beneath
14 the system, centered horizontally on the measure's extent.  This
15 snippet shows how the @code{Measure_counter_engraver} may be used to
16 simulate this notational practice.  Here, the engraver has been added
17 to a @code{Dynamics} context.
18
19 "
20   doctitle = "Centered measure numbers"
21 } % begin verbatim
22
23 \layout {
24   \context {
25     \Dynamics
26     \consists #Measure_counter_engraver
27     \override MeasureCounter.direction = #DOWN
28     \override MeasureCounter.font-encoding = #'latin1
29     \override MeasureCounter.font-shape = #'italic
30     % to control the distance of the Dynamics context from the staff:
31     \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #2
32   }
33   \context {
34     \Score
35     \remove "Bar_number_engraver"
36   }
37 }
38
39 pattern = \repeat unfold 7 { c'4 d' e' f' }
40
41 \new StaffGroup <<
42   \new Staff {
43     \pattern
44   }
45   \new Staff {
46     \pattern
47   }
48   \new Dynamics {
49     \startMeasureCount
50     s1*7
51     \stopMeasureCount
52   }
53 >>