% !TEX TS-program = Lilypond
\version "2.12.3"

#(set-global-staff-size 11.11)

\header {
	title = "keepAliveInterfaces"
	subtitle = "“I will survive!”"
}

\paper {
	tagline = ##f
	ragged-last-bottom = ##f
	
	after-title-space = #0.1
	between-system-space = #0.1
	between-system-padding = #0.1
	before-title-space = #0.1
	between-title-space = #0.1
}

show = {
	\set Staff.keepAliveInterfaces = #'(
		multi-measure-rest-interface
		rhythmic-grob-interface
	)
}

hide = { \unset Staff.keepAliveInterfaces }

global = {
	\override Score.RehearsalMark #'self-alignment-X = #LEFT
	\mark "Vorspiel: nur Klaviere, Gesangsstimmen ausgeblendet"
	s1*8 \break
	\mark \markup \column {
		"Chor dazu; Tenor: sichtbare Ganztaktpausen; Solo: weiterhin ausgeblendet;"
		"Klaviere: linke Hand sichtbar trotz Sprung in rechte Hand"
	}
	s1*8 \break
	\mark "Solo dazu; Sopran, Alt, Klaviere: sichtbare Ganztaktpausen"
	s1*8 \break
	\mark "Tutti; Bässe: sichtbare Ganztaktpausen"
	s1*8 \bar "|."
}

solo = \relative {
	R1*8
	R1*8
	\repeat unfold 8 { c4 d e f }
	\repeat unfold 8 { c4 d e f }
}

sopran = \relative c' {
	R1*8
	\repeat unfold 8 { c4 d e f }
	\show
	R1*8
	\repeat unfold 8 { c4 d e f }
}

alt = \relative c' {
	R1*8
	\repeat unfold 8 { c4 d e f }
	\show
	R1*8
	\repeat unfold 8 { c4 d e f }
}

tenor = \relative c {
	\clef "treble_8"
	R1*8
	%% \show erst einen Takt später einsetzen!
	%% hat sonst Effekt auf vorangegangene MMRs am Zeilenumbruch
	R1 \show R1*7
	\repeat unfold 8 { c4 d e f }
	\repeat unfold 8 { c4 d e f }
}

bass = \relative c {
	\clef "bass"
	R1*8
	\repeat unfold 8 { c4 d e f }
	\repeat unfold 8 { c4 d e f }
	\show
	R1*8
}

RH = \relative {
	\repeat unfold 8 { e4 f g a }
	\repeat unfold 8 { e4 f g a }
	\show
	R1*8
	\repeat unfold 8 { e4 f g a }
}

LH = \relative {
	\clef "bass"
	\repeat unfold 8 { c,4 d e f }
	\change Staff = "Piano RH" \voiceTwo
	\repeat unfold 8 { c'4 d e f }
	\change Staff = "Piano LH" \oneVoice
	\show
	R1*8
	\repeat unfold 8 { c,4 d e f }
}

\score { <<
	\context Staff = "Solo" \with {
		instrumentName = #"Solo"
		shortInstrumentName = #"Solo"
	}{ << \global \solo >> }
	
	\context ChoirStaff = "Chor" <<
		\context Staff = "Sopran" \with {
			instrumentName = #"Sopran"
			shortInstrumentName = #"S"
		}{ << \global \sopran >> }
		\context Staff = "Alt" \with {
			instrumentName = #"Alt"
			shortInstrumentName = #"A"
		}{ << \global \alt >> }
		\context Staff = "Tenor" \with {
			instrumentName = #"Tenor"
			shortInstrumentName = #"T"
		}{ << \global \tenor >> }
		\context Staff = "Bass" \with {
			instrumentName = #"Bass"
			shortInstrumentName = #"B"
		}{ << \global \bass >> }
	>>
	
	\context PianoStaff = "Piano 1" <<
		\set PianoStaff.instrumentName = \markup { \number "1." }
		\set PianoStaff.shortInstrumentName = \markup { \number "1." }
		\context Staff = "Piano RH" { << \global \RH >> }
		\context Staff = "Piano LH" { << \global \LH >> }
	>>
	
	\context PianoStaff = "Piano 2" <<
		\set PianoStaff.instrumentName = \markup { \number "2." }
		\set PianoStaff.shortInstrumentName = \markup { \number "2." }
		\context Staff = "Piano RH" { << \global \RH >> }
		\context Staff = "Piano LH" { << \global \LH >> }
	>>
>>

	\layout {
		indent = #5
		short-indent = #5
		\context {
			\RemoveEmptyStaffContext
			\override VerticalAxisGroup #'remove-first = ##t
		}
	}
}