song2: keys: Declare staff in 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"
22 \with {
23 instrumentName = #"Synthesizer"
24 shortInstrumentName = #"Synth"
25 pedalSustainStyle = #'bracket
26 } { \keyboard }
27 \new Staff = "bass" { \bass }
28 \new Staff = "grand stick" { \stick }
29 >>
30
31 %% Two scores are needed: one with unfolded repeats for MIDI and the
32 %% other with regular repeats for notation.
33 \score {
34 \unfoldRepeats {
35 <<
36 \AllMusic
37 \new DrumStaff { \click }
38 >>
39 }
40 \midi { \tempo 4 = 90 }
41 }
42
43 \score {
44 \AllMusic
45 \layout {
46 \tempo 4 = 90
47 \context {
48 %% add the RemoveEmptyStaffContext that erases rest-only staves
49 \Staff \RemoveEmptyStaves
50 }
51 \context {
52 \Score
53 \numericTimeSignature
54 %% Remove all-rest staves also in the first system
55 \override VerticalAxisGroup.remove-first = ##t
56 %% If only one non-empty staff in a system exists, still print the starting bar
57 \override SystemStartBar.collapse-height = #1
58 }
59 }
60 }