1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Accompanied Choir with Multiple Verses %%
5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8 This file may be \include'd in a score to provide the
9 context structure for a score arrangement consisting
10 of the following staves:
13 Soprano and Alto (optionally on two Staves or one Staff)
14 Multiple verses (up to 9)
15 Tenor and Bass (optionally on two Staves or one Staff)
18 It is intended primarily to hide the complexity of the context
19 structure from newcomers to LilyPond, but is also useful as a
20 shorthand for seasoned users.
24 satb.ly should be included at the *end* of the input file. Before
25 it are placed the required music and lyrics by redefining specific
32 DescantMusic = \relative { ... }
33 DescantLyrics = \lyricmode { ... }
34 SopranoMusic = \relative { ... }
35 SopranoLyrics = \lyricmode { ... }
36 AltoMusic = \relative { ... }
37 AltoLyrics = \lyricmode { ... }
38 VerseOne = \lyricmode { ... }
39 VerseTwo = \lyricmode { ... }
41 VerseNine = \lyricmode { ... }
42 TenorMusic = \relative { ... }
43 TenorLyrics = \lyricmode { ... }
44 BassMusic = \relative { ... }
45 BassLyrics = \lyricmode { ... }
46 PianoRHMusic = \relative { ... }
47 PianoDynamics = { ... }
48 PianoLHMusic = \relative { ... }
49 TwoVoicesPerStaff = ##f
52 All of the definitions are optional. Staves with no music will be
53 omitted from the output.
55 Other variables, such as the instrumentName, can also be changed by
56 defining variables like AltoInstrumentName. The key is defined in
57 the variable Key, and the structure of time and repeats in the
58 variable Time, using spacer rests. A \layout block may be defined in
59 the variable Layout. There is no default \header block and no default
62 Music may be tagged with #'print or #'play to be included only in
63 the printed score or in the MIDI file respectively.
67 #(defmacro defaulting (name . default)
68 (if (defined? name) name (if (pair? default) (car default) '#{#})))
70 #(define (sym . strings) (string->symbol (apply string-append strings)))
72 #(defmacro short-name (part)
73 "Use PartShortInstrumentName, or the first letter of
74 PartInstrumentName or its default."
75 (if (defined? (sym part "Music"))
76 (let ((sname (sym part "ShortInstrumentName")))
79 `(substring (defaulting ,(sym part "InstrumentName") ,part)
83 #(defmacro lyrics-if-defined (name voice . optionals)
84 (let ((above (if (pair? optionals) (car optionals) #f)))
86 `(make-music 'ContextSpeccedMusic
89 'property-operations ',(if above `((assign alignAboveContext ,above)) '())
90 'element (make-music 'LyricCombineMusic
91 'associated-context ,voice
95 #(defmacro one-voice-staff (name clef)
97 \new Staff = #(identity ,name) \with {
98 instrumentName = \markup \smallCaps
99 #(defaulting ,(sym name "InstrumentName") ,name)
100 shortInstrumentName = \markup \smallCaps #(short-name ,name)
101 midiInstrument = "clarinet"
104 \clef #(identity ,clef)
105 \new Voice = #(identity ,name) <<
108 #(defaulting ,(sym name "Music"))
111 #(lyrics-if-defined ,(sym name "Lyrics") ,name)
112 #(lyrics-if-defined ,(sym name "LyricsOne") ,name)
113 #(lyrics-if-defined ,(sym name "LyricsTwo") ,name)
114 #(lyrics-if-defined ,(sym name "LyricsThree") ,name)
117 #(defmacro two-voice-staff (name clef v1name v2name)
119 \new Staff = #(identity ,name) \with {
120 instrumentName = \markup \right-column \smallCaps {
121 #(defaulting ,(sym v1name "InstrumentName") ,v1name)
122 #(defaulting ,(sym v2name "InstrumentName") ,v2name)
124 shortInstrumentName = \markup \right-column \smallCaps {
125 #(short-name ,v1name)
126 #(short-name ,v2name)
128 midiInstrument = "clarinet"
131 \clef #(identity ,clef)
132 \new Voice = #(identity ,v1name) <<
136 #(defaulting ,(sym v1name "Music"))
138 \new Voice = #(identity ,v2name) <<
141 #(defaulting ,(sym v2name "Music"))
144 #(lyrics-if-defined ,(sym v1name "Lyrics") ,v1name ,name)
145 #(lyrics-if-defined ,(sym v1name "LyricsOne") ,v1name ,name)
146 #(lyrics-if-defined ,(sym v1name "LyricsTwo") ,v1name ,name)
147 #(lyrics-if-defined ,(sym v1name "LyricsThree") ,v1name ,name)
148 #(lyrics-if-defined ,(sym v2name "Lyrics") ,v2name)
149 #(lyrics-if-defined ,(sym v2name "LyricsOne") ,v2name)
150 #(lyrics-if-defined ,(sym v2name "LyricsTwo") ,v2name)
151 #(lyrics-if-defined ,(sym v2name "LyricsThree") ,v2name)
157 \override VerticalAxisGroup.remove-empty = ##t
158 \override VerticalAxisGroup.remove-first = ##t
161 #(one-voice-staff "Descant" "treble")
163 #(if (defaulting TwoVoicesPerStaff #f)
164 (two-voice-staff "Women" "treble" "Soprano" "Alto")
165 (make-simultaneous-music (list (one-voice-staff "Soprano" "treble")
166 (one-voice-staff "Alto" "treble"))))
168 #(lyrics-if-defined VerseOne "Soprano")
169 #(lyrics-if-defined VerseTwo "Soprano")
170 #(lyrics-if-defined VerseThree "Soprano")
171 #(lyrics-if-defined VerseFour "Soprano")
172 #(lyrics-if-defined VerseFive "Soprano")
173 #(lyrics-if-defined VerseSix "Soprano")
174 #(lyrics-if-defined VerseSeven "Soprano")
175 #(lyrics-if-defined VerseEight "Soprano")
176 #(lyrics-if-defined VerseNine "Soprano")
178 #(if (defaulting TwoVoicesPerStaff #f)
179 (two-voice-staff "Men" "bass" "Tenor" "Bass")
180 (make-simultaneous-music (list (one-voice-staff "Tenor" "treble_8")
181 (one-voice-staff "Bass" "bass"))))
186 instrumentName = \markup \smallCaps
187 #(defaulting PianoInstrumentName "Piano" )
188 shortInstrumentName = \markup \smallCaps #(short-name "Piano" )
189 \override VerticalAxisGroup.remove-empty = ##t
190 \override VerticalAxisGroup.remove-first = ##t
198 #(defaulting PianoRHMusic)
202 #(defaulting PianoDynamics)
209 #(defaulting PianoLHMusic)
216 \keepWithTag #'print \SATB
217 \layout { #(defaulting Layout) }
221 \keepWithTag #'play \SATB