]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/printing-music-with-different-time-signatures.ly
LSR: update.
[lilypond.git] / Documentation / snippets / printing-music-with-different-time-signatures.ly
1 %% Do not edit this file; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% This file is in the public domain.
4 \version "2.13.31"
5
6 \header {
7   lsrtags = "rhythms, percussion"
8
9   texidoc = "
10 In the following snippet, two parts have a completely different time
11 signature, yet remain synchronized. The bar lines can no longer be
12 printed at the @code{Score} level; to allow independent bar lines in
13 each part, the @code{Default_barline_engraver} and
14 @code{Timing_translator} are moved from the @code{Score} context to the
15 @code{Staff} context.
16
17 If bar numbers are required, the @code{Bar_number_engraver} should also
18 be moved, since it relies on properties set by the
19 @code{Timing_translator}; a @code{\\with} block can be used to add bar
20 numbers to the relevant staff.
21
22
23
24 "
25   doctitle = "Printing music with different time signatures"
26 } % begin verbatim
27
28 \paper {
29   indent = #0
30   ragged-right = ##t
31 }
32
33 global = { \time 3/4 { s2.*3 } \bar "" \break { s2.*3 } }
34
35 \layout {
36   \context {
37     \Score
38     \remove "Timing_translator"
39     \remove "Default_bar_line_engraver"
40     \remove "Bar_number_engraver"
41     \override SpacingSpanner #'uniform-stretching = ##t
42     \override SpacingSpanner #'strict-note-spacing = ##t
43     proportionalNotationDuration = #(ly:make-moment 1 64)
44   }
45   \context {
46     \Staff
47     \consists "Timing_translator"
48     \consists "Default_bar_line_engraver"
49   }
50   \context {
51     \Voice
52     \remove "Forbid_line_break_engraver"
53     tupletFullLength = ##t
54   }
55 }
56
57 Bassklarinette = \new Staff \with {
58   \consists "Bar_number_engraver"
59   barNumberVisibility = #(every-nth-bar-number-visible 2)
60   \override BarNumber #'break-visibility = #end-of-line-invisible
61 } <<
62   \global {
63     \bar "|"
64     \clef treble
65     \time 3/8
66     d''4.
67
68     \bar "|"
69     \time 3/4
70     r8 des''2( c''8)
71
72     \bar "|"
73     \time 7/8
74     r4. ees''2 ~
75
76     \bar "|"
77     \time 2/4
78     \tupletUp
79     \times 2/3 { ees''4 r4 d''4 ~ }
80
81     \bar "|"
82     \time 3/8
83     \tupletUp
84     \times 3/4 { d''4 r4 }
85
86     \bar "|"
87     \time 2/4
88     e''2
89
90     \bar "|"
91     \time 3/8
92     es''4.
93
94     \bar "|"
95     \time 3/4
96     r8 d''2 r8
97     \bar "|"
98   }
99 >>
100
101 Perkussion = \new StaffGroup <<
102   \new Staff <<
103     \global {
104       \bar "|"
105       \clef percussion
106       \time 3/4
107       r4 c'2 ~
108
109       \bar "|"
110       c'2.
111
112       \bar "|"
113       R2.
114
115       \bar "|"
116       r2 g'4 ~
117
118       \bar "|"
119       g'2. ~
120
121       \bar "|"
122       g'2.
123     }
124   >>
125   \new Staff <<
126     \global {
127       \bar "|"
128       \clef percussion
129       \time 3/4
130       R2.
131
132       \bar "|"
133       g'2. ~
134
135       \bar "|"
136       g'2.
137
138       \bar "|"
139       r4 g'2 ~
140
141       \bar "|"
142       g'2 r4
143
144       \bar "|"
145       g'2.
146     }
147   >>
148 >>
149
150 \score {
151   <<
152     \Bassklarinette
153     \Perkussion
154   >>
155 }
156