]> 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.4"
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 "Time_signature_engraver"
40     \remove "Default_bar_line_engraver"
41     \remove "Bar_number_engraver"
42     \override SpacingSpanner #'uniform-stretching = ##t
43     \override SpacingSpanner #'strict-note-spacing = ##t
44     proportionalNotationDuration = #(ly:make-moment 1 64)
45   }
46   \context {
47     \Staff
48     \consists "Timing_translator"
49     \consists "Default_bar_line_engraver"
50     \consists "Time_signature_engraver"
51   }
52   \context {
53     \Voice
54     \remove "Forbid_line_break_engraver"
55     tupletFullLength = ##t
56   }
57 }
58
59 Bassklarinette = \new Staff \with {
60   \consists "Bar_number_engraver"
61   barNumberVisibility = #(every-nth-bar-number-visible 2)
62   \override BarNumber #'break-visibility = #end-of-line-invisible
63 } <<
64   \global {
65     \bar "|"
66     \clef treble
67     \time 3/8
68     d''4.
69
70     \bar "|"
71     \time 3/4
72     r8 des''2( c''8)
73
74     \bar "|"
75     \time 7/8
76     r4. ees''2 ~
77
78     \bar "|"
79     \time 2/4
80     \tupletUp
81     \times 2/3 { ees''4 r4 d''4 ~ }
82
83     \bar "|"
84     \time 3/8
85     \tupletUp
86     \times 3/4 { d''4 r4 }
87
88     \bar "|"
89     \time 2/4
90     e''2
91
92     \bar "|"
93     \time 3/8
94     es''4.
95
96     \bar "|"
97     \time 3/4
98     r8 d''2 r8
99     \bar "|"
100   }
101 >>
102
103 Perkussion = \new StaffGroup <<
104   \new Staff <<
105     \global {
106       \bar "|"
107       \clef percussion
108       \time 3/4
109       r4 c'2 ~
110
111       \bar "|"
112       c'2.
113
114       \bar "|"
115       R2.
116
117       \bar "|"
118       r2 g'4 ~
119
120       \bar "|"
121       g'2. ~
122
123       \bar "|"
124       g'2.
125     }
126   >>
127   \new Staff <<
128     \global {
129       \bar "|"
130       \clef percussion
131       \time 3/4
132       R2.
133
134       \bar "|"
135       g'2. ~
136
137       \bar "|"
138       g'2.
139
140       \bar "|"
141       r4 g'2 ~
142
143       \bar "|"
144       g'2 r4
145
146       \bar "|"
147       g'2.
148     }
149   >>
150 >>
151
152 \score {
153   <<
154     \Bassklarinette
155     \Perkussion
156   >>
157 }
158