summaryrefslogtreecommitdiff
path: root/04-white-noise/04-white-noise.ly
blob: 2a800c3995fd2f6ea9038a591998e7355a96862c (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
\version "2.19.27"

\header {
  title = "White Noise"
  composer = "The very pretentious elephlies"
  copyright = \markup { \char ##x00A9 "2002—2016 Ricardo Wurmus" }
}


\include "../settings.ly"
\include "music/common.ly"
\include "music/bass.ly"
\include "music/keys.ly"
\include "music/stick.ly"
\include "music/click.ly"

AllMusic = <<
  \new Staff = "keyboard"    { \keyboard }
  \new Staff = "bass"        { \bass }
  \new Staff = "grand stick" { \stick }
>>

%% Two scores are needed: one with unfolded repeats for MIDI and the
%% other with regular repeats for notation.
\score {
  \unfoldRepeats {
    <<
      \AllMusic
      \new DrumStaff { \click }
    >>
  }
  \midi { \tempo 4 = 120 }
}

\score {
  \AllMusic
  \layout {
    \tempo 4 = 120
    \context { 
      %% add the RemoveEmptyStaffContext that erases rest-only staves
      \Staff \RemoveEmptyStaves 
    }
    \context {
      \Score
      %% Remove all-rest staves also in the first system
      \override VerticalAxisGroup.remove-first = ##t
      %% If only one non-empty staff in a system exists, still print the starting bar
      \override SystemStartBar.collapse-height = #1
    }
  }
}