3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 %% Accompanied Choir with Multiple Verses %%
7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10 This file may be \include'd in a score to provide the
11 context structure for a score arrangement consisting
12 of the following staves:
15 Soprano and Alto (optionally on two Staves or one Staff)
16 Multiple verses (up to 9)
17 Tenor and Bass (optionally on two Staves or one Staff)
20 It is intended primarily to hide the complexity of the context
21 structure from newcomers to LilyPond, but is also useful as a
22 shorthand for seasoned users.
26 satb.ly should be included at the *end* of the input file. Before
27 it are placed the required music and lyrics by redefining specific
34 DescantMusic = \relative { ... }
35 DescantLyrics = \lyricmode { ... }
36 SopranoMusic = \relative { ... }
37 SopranoLyrics = \lyricmode { ... }
38 AltoMusic = \relative { ... }
39 AltoLyrics = \lyricmode { ... }
40 VerseOne = \lyricmode { ... }
41 VerseTwo = \lyricmode { ... }
43 VerseNine = \lyricmode { ... }
44 TenorMusic = \relative { ... }
45 TenorLyrics = \lyricmode { ... }
46 BassMusic = \relative { ... }
47 BassLyrics = \lyricmode { ... }
48 PianoRHMusic = \relative { ... }
49 PianoDynamics = { ... }
50 PianoLHMusic = \relative { ... }
51 TwoVoicesPerStaff = ##f
54 All of the definitions are optional. Staves with no music will be
55 omitted from the output.
57 Other variables, such as the instrumentName, can also be changed by
58 defining variables like AltoInstrumentName. The key is defined in
59 the variable Key, and the structure of time and repeats in the
60 variable Time, using spacer rests. A \layout block may be defined in
61 the variable Layout. There is no default \header block and no default
64 Music may be tagged with #'print or #'play to be included only in
65 the printed score or in the MIDI file respectively.
69 #(defmacro defaulting (name . default)
70 (if (defined? name) name (if (pair? default) (car default) '#{#})))
72 #(define (sym . strings) (string->symbol (apply string-append strings)))
74 #(defmacro short-name (part)
75 "Use PartShortInstrumentName, or the first letter of
76 PartInstrumentName or its default."
77 (if (defined? (sym part "Music"))
78 (let ((sname (sym part "ShortInstrumentName")))
81 `(substring (defaulting ,(sym part "InstrumentName") ,part)
85 #(defmacro lyrics-if-defined (name voice . optionals)
86 (let ((above (if (pair? optionals) (car optionals) #f)))
88 `(make-music 'ContextSpeccedMusic
91 'property-operations ',(if above `((assign alignAboveContext ,above)) '())
92 'element (make-music 'LyricCombineMusic
93 'associated-context ,voice
97 #(defmacro one-voice-staff (name clef)
99 \new Staff = #(identity ,name) \with {
100 instrumentName = \markup \smallCaps
101 #(defaulting ,(sym name "InstrumentName") ,name)
102 shortInstrumentName = \markup \smallCaps #(short-name ,name)
103 midiInstrument = "clarinet"
106 \clef #(identity ,clef)
107 \new Voice = #(identity ,name) <<
110 #(defaulting ,(sym name "Music"))
113 #(lyrics-if-defined ,(sym name "Lyrics") ,name)
114 #(lyrics-if-defined ,(sym name "LyricsOne") ,name)
115 #(lyrics-if-defined ,(sym name "LyricsTwo") ,name)
116 #(lyrics-if-defined ,(sym name "LyricsThree") ,name)
119 #(defmacro two-voice-staff (name clef v1name v2name)
121 \new Staff = #(identity ,name) \with {
122 instrumentName = \markup \right-column \smallCaps {
123 #(defaulting ,(sym v1name "InstrumentName") ,v1name)
124 #(defaulting ,(sym v2name "InstrumentName") ,v2name)
126 shortInstrumentName = \markup \right-column \smallCaps {
127 #(short-name ,v1name)
128 #(short-name ,v2name)
130 midiInstrument = "clarinet"
133 \clef #(identity ,clef)
134 \new Voice = #(identity ,v1name) <<
138 #(defaulting ,(sym v1name "Music"))
140 \new Voice = #(identity ,v2name) <<
143 #(defaulting ,(sym v2name "Music"))
146 #(lyrics-if-defined ,(sym v1name "Lyrics") ,v1name ,name)
147 #(lyrics-if-defined ,(sym v1name "LyricsOne") ,v1name ,name)
148 #(lyrics-if-defined ,(sym v1name "LyricsTwo") ,v1name ,name)
149 #(lyrics-if-defined ,(sym v1name "LyricsThree") ,v1name ,name)
150 #(lyrics-if-defined ,(sym v2name "Lyrics") ,v2name)
151 #(lyrics-if-defined ,(sym v2name "LyricsOne") ,v2name)
152 #(lyrics-if-defined ,(sym v2name "LyricsTwo") ,v2name)
153 #(lyrics-if-defined ,(sym v2name "LyricsThree") ,v2name)
159 \override VerticalAxisGroup.remove-empty = ##t
160 \override VerticalAxisGroup.remove-first = ##t
163 #(one-voice-staff "Descant" "treble")
165 #(if (defaulting TwoVoicesPerStaff #f)
166 (two-voice-staff "Women" "treble" "Soprano" "Alto")
167 (make-simultaneous-music (list (one-voice-staff "Soprano" "treble")
168 (one-voice-staff "Alto" "treble"))))
170 #(lyrics-if-defined VerseOne "Soprano")
171 #(lyrics-if-defined VerseTwo "Soprano")
172 #(lyrics-if-defined VerseThree "Soprano")
173 #(lyrics-if-defined VerseFour "Soprano")
174 #(lyrics-if-defined VerseFive "Soprano")
175 #(lyrics-if-defined VerseSix "Soprano")
176 #(lyrics-if-defined VerseSeven "Soprano")
177 #(lyrics-if-defined VerseEight "Soprano")
178 #(lyrics-if-defined VerseNine "Soprano")
180 #(if (defaulting TwoVoicesPerStaff #f)
181 (two-voice-staff "Men" "bass" "Tenor" "Bass")
182 (make-simultaneous-music (list (one-voice-staff "Tenor" "treble_8")
183 (one-voice-staff "Bass" "bass"))))
188 instrumentName = \markup \smallCaps
189 #(defaulting PianoInstrumentName "Piano" )
190 shortInstrumentName = \markup \smallCaps #(short-name "Piano" )
191 \override VerticalAxisGroup.remove-empty = ##t
192 \override VerticalAxisGroup.remove-first = ##t
200 #(defaulting PianoRHMusic)
204 #(defaulting PianoDynamics)
211 #(defaulting PianoLHMusic)
218 \keepWithTag #'print \SATB
219 \layout { #(defaulting Layout) }
223 \keepWithTag #'play \SATB