song2: Move layout to score file.
[music/pretentious.git] / 02-song2 / 02-song2.ly
1 \version "2.19.27"
2
3 \header {
4 title = "Song 2"
5 composer = "The very pretentious elephlies"
6 copyright = \markup { \char ##x00A9 "2002—2016 Ricardo Wurmus" }
7 }
8
9 \include "parts/bass.ly"
10 \include "parts/keys.ly"
11 \include "parts/stick.ly"
12 \include "parts/click.ly"
13
14 \layout {
15 ragged-last = ##t
16 indent = 2\cm
17 short-indent = 1.5\cm
18 }
19
20 AllMusic = <<
21 \new Staff = "keyboard" { \keyboard }
22 \new Staff = "bass" { \bass }
23 \new Staff = "grand stick" { \stick }
24 >>
25
26 %% Two scores are needed: one with unfolded repeats for MIDI and the
27 %% other with regular repeats for notation.
28 \score {
29 \unfoldRepeats {
30 <<
31 \AllMusic
32 \new DrumStaff { \click }
33 >>
34 }
35 \midi { \tempo 4 = 90 }
36 }
37
38 \score {
39 \AllMusic
40 \layout {
41 \tempo 4 = 90
42 \context {
43 %% add the RemoveEmptyStaffContext that erases rest-only staves
44 \Staff \RemoveEmptyStaves
45 }
46 \context {
47 \Score
48 \numericTimeSignature
49 %% Remove all-rest staves also in the first system
50 \override VerticalAxisGroup.remove-first = ##t
51 %% If only one non-empty staff in a system exists, still print the starting bar
52 \override SystemStartBar.collapse-height = #1
53 }
54 }
55 }