]> git.donarmstrong.com Git - lilypond.git/blob - ly/satb.ly
Web-ja: update introduction
[lilypond.git] / ly / satb.ly
1 %\version "2.19.19"
2
3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4 %%                                                %%
5 %%     Accompanied Choir with Multiple Verses     %%
6 %%                                                %%
7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8
9 %{
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:
13
14   Solo Staff (outside Choir grouping)
15   Descant Staff (within Choir grouping)
16   Women Staff (single voice on one staff)
17   Soprano and Alto (optionally on two Staves or one Staff each)
18   Multiple verses (up to 9)
19   Tenor and Bass (optionally on two Staves or one Staff each)
20   Men Staff (single voice on one staff)
21   Piano Staff
22
23   It is intended primarily to hide the complexity of the context
24   structure from newcomers to LilyPond, but is also useful as a
25   shorthand for seasoned users.
26
27   Usage:
28
29   satb.ly should be included at the *end* of the input file. Before
30   it are placed the required music and lyrics by redefining specific
31   variables, like this:
32
33   \paper { ... }
34   \header { ... }
35   Key = { ... }
36   Time = { ... }
37   SoloMusic = \relative { ... }
38   DescantMusic = \relative { ... }
39   DescantLyrics = \lyricmode { ... }
40   WomenMusic = \relative { ... }
41   WomenLyrics = \lyricmode { ... }
42   SopranoMusic = \relative { ... }
43   SopranoLyrics = \lyricmode { ... }
44   AltoMusic = \relative { ... }
45   AltoLyrics = \lyricmode { ... }
46   VerseOne = \lyricmode { ... }
47   VerseTwo = \lyricmode { ... }
48   ...
49   VerseNine = \lyricmode { ... }
50   TenorMusic = \relative { ... }
51   TenorLyrics = \lyricmode { ... }
52   BassMusic = \relative { ... }
53   BassLyrics = \lyricmode { ... }
54   MenMusic = \relative { ... }
55   MenLyrics = \lyricmode { ... }
56   PianoRHMusic = \relative { ... }
57   PianoDynamics = { ... }
58   PianoLHMusic = \relative { ... }
59   TwoVoicesPerStaff = ##f
60   \include "satb.ly"
61
62   All of the definitions are optional. Staves with no music will be
63   omitted from the output.
64
65   Other variables, such as the instrumentName, shortInstrumentName
66   and MidiInstrument can also be changed by defining variables like
67   AltoInstrumentName, BassMidiInstrument, etc.  The prefixes for staves
68   containing two divided voices are WomenDivided and MenDivided, hence
69   the corresponding variables would be WomenDividedInstrumentName, etc.
70   The key is defined in the variable Key, and the structure of time
71   and repeats in the variable Time, using spacer rests.
72
73   A \layout block may be defined in the variable Layout.  There is
74   no default \header block and no default \paper block.
75
76   Music may be tagged with #'print or #'play to be included only in
77   the printed score or in the MIDI file respectively.
78
79 %}
80
81 \include "vocal-tkit.ly"
82 \include "piano-tkit.ly"
83
84 #(define satb-voice-prefixes
85    ;; These define the permitted prefixes to various names.
86    ;; They are combined with a fixed set of postfixes to form
87    ;; names such as AltoMusic, BassInstrumentName, etc.
88    ;; These names may be redefined.
89    '("Alto"
90      "Bass"
91      "Descant"
92      "Men"
93      "MenDivided"
94      "Piano"
95      "PianoLH"
96      "PianoRH"
97      "Solo"
98      "Soprano"
99      "Tenor"
100      "Women"
101      "WomenDivided"))
102
103 #(define satb-lyrics-postfixes
104    ;; These define the permitted postfixes to the names of lyrics.
105    ;; They are combined with the prefixes to form names like
106    ;; AltoLyrics, etc.
107    ;; These names may be redefined or extended.
108   '("Lyrics"
109     "LyricsOne"
110     "LyricsTwo"
111     "LyricsThree"
112     "LyricsFour"))
113
114 #(define satb-lyrics-variable-names
115    ;; These define the names which may be used to specify stanzas
116    ;; which go between the two two-voice staves when TwoVoicesPerStaff
117    ;; is set to #t.  They may be redefined or extended.
118   '("VerseOne"
119     "VerseTwo"
120     "VerseThree"
121     "VerseFour"
122     "VerseFive"
123     "VerseSix"
124     "VerseSeven"
125     "VerseEight"
126     "VerseNine"))
127
128 %% make the above definitions available
129 #(set-music-definitions!
130   satb-voice-prefixes
131   satb-lyrics-postfixes
132   satb-lyrics-variable-names)
133
134 %% override the usual default value
135 #(if (not SoloShortInstrumentName)
136        (set! SoloShortInstrumentName ""))
137
138 SATB =
139 <<
140   \make-one-voice-vocal-staff "Solo" "treble"
141   \new ChoirStaff <<
142     \make-one-voice-vocal-staff "Descant" "treble"
143     \make-one-voice-vocal-staff "Women" "treble"
144     #(if TwoVoicesPerStaff
145       #{
146         \make-two-vocal-staves-with-stanzas
147           "WomenDivided" "treble" "MenDivided" "bass"
148           "Soprano" "Alto" "Tenor" "Bass"
149           #satb-lyrics-variable-names
150       #}
151       #{
152         <<
153           \make-one-voice-vocal-staff "Soprano" "treble"
154           \make-one-voice-vocal-staff "Alto" "treble"
155           \make-one-voice-vocal-staff "Tenor" "treble_8"
156           \make-one-voice-vocal-staff "Bass" "bass"
157         >>
158       #} )
159     \make-one-voice-vocal-staff "Men" "bass"
160   >>
161 >>
162
163 Piano = \make-pianostaff
164
165 \tagGroup #'(print play)
166
167 \layout {
168   \context {
169     \Staff
170     \override VerticalAxisGroup.remove-empty = ##t
171     \override VerticalAxisGroup.remove-first = ##t
172   }
173 }
174
175 \score {
176   \keepWithTag #'print
177   #(if have-music
178        #{ << \SATB \Piano >> #}
179        #{ { } #} )
180   \layout { $(if Layout Layout) }
181 }
182
183
184 \score {
185   \keepWithTag #'play
186   #(if have-music
187        #{ << \SATB \Piano >> #}
188        #{ { } #} )
189   \midi {
190     \context {
191       \Score
192       midiChannelMapping = #'instrument
193     }
194   }
195 }