5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7 %% Accompanied Divided Choir %%
9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 This file may be \include'd in a score to provide the
13 context structure for a score arrangement consisting
14 of the following staves, although normally only a subset
15 of these staves would be used in any one score.
17 Solo Staff (outside Choir grouping)
18 Descant Staff (within Choir grouping)
19 Women Staff (single voice on one staff)
20 First and Second Soprano (optionally on two Staves or one Staff)
21 Soprano and Alto (optionally on two Staves or one Staff)
22 First and Second Alto (optionally on two Staves or one Staff)
23 First and Second Tenor (optionally on two Staves or one Staff)
24 Tenor and Bass (optionally on two Staves or one Staff)
25 First and Second Bass (optionally on two Staves or one Staff)
26 Men Staff (single voice on one staff)
29 It is intended primarily to hide the complexity of the context
30 structure from newcomers to LilyPond, but is also useful as a
31 shorthand for seasoned users. It is intended to facilitate the
32 setting of pieces in which different groupings of voices appear
33 at different times. All that is necessary is to populate the
34 appropriate variables with music for the relevant sections and
35 with rests elsewhere, with sections separated by line breaks.
39 ssaattbb.ly should be included at the *end* of the input file. Before
40 it are placed the required music and lyrics by redefining specific
47 SopranoOneMusic = \relative { ... }
48 SopranoOneLyrics = \lyricmode { ... }
49 SopranoTwoMusic = \relative { ... }
50 SopranoTwoLyrics = \lyricmode { ... }
51 AltoOneMusic = \relative { ... }
52 AltoOneLyrics = \lyricmode { ... }
53 AltoTwoMusic = \relative { ... }
54 AltoTwoLyrics = \lyricmode { ... }
55 TenorOneMusic = \relative { ... }
56 TenorOneLyrics = \lyricmode { ... }
57 TenorTwoMusic = \relative { ... }
58 TenorTwoLyrics = \lyricmode { ... }
59 BassOneMusic = \relative { ... }
60 BassOneLyrics = \lyricmode { ... }
61 BassTwoMusic = \relative { ... }
62 BassTwoLyrics = \lyricmode { ... }
63 PianoRHMusic = \relative { ... }
64 PianoDynamics = { ... }
65 PianoLHMusic = \relative { ... }
66 TwoVoicesPerStaff = ##f (applies to all staves)
67 \include "ssaattbb.ly"
69 In addition, if there are sections in which two or more parts
70 are in unison, the following variables may also be defined:
72 WomenMusic = \relative { ... }
73 WomenLyrics = \lyricmode { ... }
74 SopranoMusic = \relative { ... }
75 SopranoLyrics = \lyricmode { ... }
76 AltoMusic = \relative { ... }
77 AltoLyrics = \lyricmode { ... }
78 TenorMusic = \relative { ... }
79 TenorLyrics = \lyricmode { ... }
80 BassMusic = \relative { ... }
81 BassLyrics = \lyricmode { ... }
82 MenMusic = \relative { ... }
83 MenLyrics = \lyricmode { ... }
85 All of the definitions are optional. Staves with no music will be
86 omitted from the output.
88 If TwoVoicesPerStaff is #f, music of the various voices may be
89 placed individually on one or two staves according to the
90 following variables, all of which default to #f:
92 WomenTwoVoicesPerStaff
93 SopranoTwoVoicesPerStaff
95 TenorTwoVoicesPerStaff
99 Other variables, such as the instrumentName, shortInstrumentName
100 and MidiInstrument can also be changed by defining variables like
101 AltoInstrumentName, BassMidiInstrument, etc. The prefixes for staves
102 containing two divided voices are WomenDivided and MenDivided, etc
103 hence the corresponding variables would be WomenDividedInstrumentName,
106 The key is defined in the variable Key, and the structure of time
107 and repeats in the variable Time, using spacer rests.
109 A \layout block may be defined in the variable Layout. There is
110 no default \header block and no default \paper block.
112 Music may be tagged with #'print or #'play to be included only in
113 the printed score or in the MIDI file respectively.
117 \include "vocal-tkit.ly"
118 \include "piano-tkit.ly"
120 #(define ssaattbb-voice-prefixes
121 ;; These define the permitted prefixes to various names.
122 ;; They are combined with a fixed set of postfixes to form
123 ;; names such as AltoMusic, BassInstrumentName, etc.
124 ;; These names may be redefined.
151 #(define ssaattbb-lyrics-postfixes
152 ;; These define the permitted postfixes to the names of lyrics.
153 ;; They are combined with the prefixes to form names like
155 ;; These names may be redefined or extended.
162 #(define ssaattbb-lyrics-variable-names
163 ;; These define the names which may be used to specify stanzas
164 ;; which go between the two two-voice staves when TwoVoicesPerStaff
165 ;; is set to #t. They may be redefined or extended.
176 %% make the above definitions available
177 #(set-music-definitions!
178 ssaattbb-voice-prefixes
179 ssaattbb-lyrics-postfixes
180 ssaattbb-lyrics-variable-names)
182 #(define ssaattbb-variable-names
183 ; Define names which are in addition to the base variable names
184 ; of Time, Layout, Key, PianoDynamics and TwoVoicesPerStaff
185 '("AltoTwoVoicesPerStaff"
186 "BassTwoVoicesPerStaff"
187 "MenTwoVoicesPerStaff"
188 "SopranoTwoVoicesPerStaff"
189 "TenorTwoVoicesPerStaff"
190 "WomenTwoVoicesPerStaff"))
192 %% and make them available
193 #(define-missing-variables! ssaattbb-variable-names)
195 #(if TwoVoicesPerStaff
196 ; Set all staves to contain two voices
198 (set! AltoTwoVoicesPerStaff #t)
199 (set! BassTwoVoicesPerStaff #t)
200 (set! MenTwoVoicesPerStaff #t)
201 (set! SopranoTwoVoicesPerStaff #t)
202 (set! TenorTwoVoicesPerStaff #t)
203 (set! WomenTwoVoicesPerStaff #t)))
205 #(define (set-default-instr-names! voice)
206 ; If the several instrument names and short instrument
207 ; names have not been defined by the user, set them to
208 ; the defaults "Soprano 1" and "S 1" etc with the same names
209 ; in a column for the divided staves"
210 (define (make-sym str1 str2)
211 (string->symbol (string-append str1 str2)))
213 (if (not (make-id voice "OneInstrumentName"))
215 (make-sym voice "OneInstrumentName")
216 (string-append voice " 1")))
217 (if (not (make-id voice "TwoInstrumentName"))
219 (make-sym voice "TwoInstrumentName")
220 (string-append voice " 2")))
221 (if (not (make-id voice "DividedInstrumentName"))
223 (make-sym voice "DividedInstrumentName")
224 #{ \markup \right-column \smallCaps {
225 #(if (make-id voice "OneMusic")
226 (make-id voice "OneInstrumentName") "")
227 #(if (make-id voice "TwoMusic")
228 (make-id voice "TwoInstrumentName") "") } #} ))
229 (if (not (make-id voice "OneShortInstrumentName"))
231 (make-sym voice "OneShortInstrumentName")
232 (string-append (substring voice 0 1) " 1")))
233 (if (not (make-id voice "TwoShortInstrumentName"))
235 (make-sym voice "TwoShortInstrumentName")
236 (string-append (substring voice 0 1) " 2")))
237 (if (not (make-id voice "DividedShortInstrumentName"))
239 (make-sym voice "DividedShortInstrumentName")
240 #{ \markup \right-column \smallCaps {
241 #(if (make-id voice "OneMusic")
242 (make-id voice "OneShortInstrumentName") "")
243 #(if (make-id voice "TwoMusic")
244 (make-id voice "TwoShortInstrumentName") "") } #} )))
246 #(set-default-instr-names! "Soprano")
247 #(set-default-instr-names! "Alto")
248 #(set-default-instr-names! "Tenor")
249 #(set-default-instr-names! "Bass")
253 \make-one-voice-vocal-staff "Solo" "treble"
256 \make-one-voice-vocal-staff "Descant" "treble"
257 \make-one-voice-vocal-staff "Women" "treble"
258 #(if SopranoTwoVoicesPerStaff
259 #{ \make-two-voice-vocal-staff "SopranoDivided" "treble" "SopranoOne" "SopranoTwo" #}
260 #{ << \make-one-voice-vocal-staff "SopranoOne" "treble"
261 \make-one-voice-vocal-staff "SopranoTwo" "treble" >> #} )
262 #(if WomenTwoVoicesPerStaff
263 #{ \make-two-voice-vocal-staff "WomenDivided" "treble" "Soprano" "Alto" #}
264 #{ << \make-one-voice-vocal-staff "Soprano" "treble"
265 \make-one-voice-vocal-staff "Alto" "treble" >> #} )
266 #(if AltoTwoVoicesPerStaff
267 #{ \make-two-voice-vocal-staff "AltoDivided" "treble" "AltoOne" "AltoTwo" #}
268 #{ << \make-one-voice-vocal-staff "AltoOne" "treble"
269 \make-one-voice-vocal-staff "AltoTwo" "treble" >> #} )
270 #(if TenorTwoVoicesPerStaff
271 #{ \make-two-voice-vocal-staff "TenorDivided" "treble_8" "TenorOne" "TenorTwo" #}
272 #{ << \make-one-voice-vocal-staff "TenorOne" "treble_8"
273 \make-one-voice-vocal-staff "TenorTwo" "treble_8" >> #} )
274 #(if MenTwoVoicesPerStaff
275 #{ \make-two-voice-vocal-staff "MenDivided" "bass" "Tenor" "Bass" #}
276 #{ << \make-one-voice-vocal-staff "Tenor" "treble_8"
277 \make-one-voice-vocal-staff "Bass" "bass" >> #} )
278 #(if BassTwoVoicesPerStaff
279 #{ \make-two-voice-vocal-staff "BassDivided" "bass" "BassOne" "BassTwo" #}
280 #{ << \make-one-voice-vocal-staff "BassOne" "bass"
281 \make-one-voice-vocal-staff "BassTwo" "bass" >> #} )
282 \make-one-voice-vocal-staff "Men" "bass"
286 Piano = \make-pianostaff
288 \tagGroup #'(print play)
293 \override VerticalAxisGroup.remove-empty = ##t
294 \override VerticalAxisGroup.remove-first = ##t
301 #{ << \SSAATTBB \Piano >> #}
303 \layout { $(if Layout Layout) }
310 #{ << \SSAATTBB \Piano >> #}
315 midiChannelMapping = #'instrument