-
Notifications
You must be signed in to change notification settings - Fork 2
/
BHScss.ly
312 lines (284 loc) · 9.66 KB
/
BHScss.ly
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
%{
Copyright 2014 Jeff Harris
This is distributed under the terms of the GNU General Public License
This file is part of LilyPond Barbershop Template.
LilyPond Barbershop Template is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
LilyPond Barbershop Template is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
%}
\version "2.18.0"
%%% Do Not Edit This File
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% Create Header from variables defined by user in title.ly
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\header {
title = \title
subtitle = \subtitle
subsubtitle = \date
poet = \lyricist
composer = \composer
arranger = \arranger
copyright = \copyright
tagline = \tagline
dedication = ""
instrument = \assungby
meter = \secondlyricist
}
%%% Set staff size to BHS Size:
%%% @Section A.1.d.
#(set-global-staff-size 20 )
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% Utility functions
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
allowGrobCallback =
#(define-scheme-function (parser location syms) (symbol-list?)
(let ((interface (car syms))
(sym (cadr syms)))
#{
\with {
\consists #(lambda (context)
`((acknowledgers .
((,interface . ,(lambda (engraver grob source-engraver)
(let ((prop (ly:grob-property grob sym)))
(if (procedure? prop) (ly:grob-set-property! grob sym (prop grob)))
))))
))
)
}
#}))
absFontSize =
#(define-scheme-function (parser location pt)(number?)
(lambda (grob)
(let* ((layout (ly:grob-layout grob))
(ref-size (ly:output-def-lookup (ly:grob-layout grob) 'text-font-size 12)))
(magnification->font-size (/ pt ref-size))
)
)
)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% Paper Block
%%%
%%% Sets paper size to letter; sets margins and line width.
%%% Defines header information as required by BHS
%%%
%%% @Section 2
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\paper {
#(set-paper-size "letter")
bottom-margin = 0.50\in
top-margin = 0.50\in
inner-margin = 0.50\in
outer-margin = 0.625\in % 5/8 inch
line-width = 7.375\in % 8.5 inch page width - ( inner-margin + outer-margin )
last-bottom-spacing = 0.5\in
ragged-last-bottom = ##t
bookTitleMarkup = \markup {
\override #'(baseline-skip . 3.5)
\column {
\fill-line {
\fromproperty #'header:dedication
}
%%% Title in 22 pt Arial Bold
%%% @Section A.4.a
\override #'(baseline-skip . 3.5)
\column {
\fill-line {
\abs-fontsize #22 {
\override #'(font-name . "Arial Bold") {
\fromproperty #'header:title
}
}
}
%%% Subtitle in 12 pt Arial Bold
%%% @Section A.4.b
\fill-line {
\abs-fontsize #12 {
\override #'(font-name . "Arial Bold") {
\fromproperty #'header:subtitle
}
}
}
%%% Date if in public Domain
%%% @Section 5
\fill-line {
\abs-fontsize #12 {
\override #'(font-name . "Arial Bold") {
\fromproperty #'header:subsubtitle
}
}
}
%%% Lyricist's Name
%%% @Section 7
\fill-line {
\abs-fontsize #12 {
\override #'(font-name . "Times") {
\fromproperty #'header:poet
}
}
{
\abs-fontsize #10 {
\override #'(font-name . "Times Italic") {
\italic \fromproperty #'header:instrument
}
}
} \abs-fontsize #12 {
\override #'(font-name . "Times") {
\fromproperty #'header:composer
}
}
}
\fill-line {
\fromproperty #'header:meter
\fromproperty #'header:arranger
}
}
}
}
oddFooterMarkup = \markup {
\column {
\fill-line {
\column {
" "
%% Copyright header field only on first page in each bookpart.
\on-the-fly #part-first-page
\abs-fontsize #9 {
\override #'(line-width . 110)
\override #'(font-name . "Times")
\wordwrap-field #'header:copyright
}
}
}
\fill-line {
%% Tagline header field only on last page in the book.
\on-the-fly #last-page
\abs-fontsize #9 {
\override #'(line-width . 110)
\override #'(font-name . "Times")
\wordwrap-field #'header:tagline
}
}
}
}
oddHeaderMarkup = \markup
\fill-line {
%% force the header to take some space, otherwise the
%% page layout becomes a complete mess.
" "
\on-the-fly #not-part-first-page
\abs-fontsize #9 {
\override #'(font-name . "Times Italic")
\fromproperty #'header:title
\on-the-fly #print-page-number-check-first \italic \fromproperty #'page:page-number-string
}
}
%% Needs evenHeaderMarkup
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% Helper markups
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
xVoice = \markup { \smaller \sans { x } } % print this by using '\xVoice'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% Assemble the parts into a score
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\include "lead/music.ly"
\include "lead/words.ly"
\include "tenor/music.ly"
\include "tenor/words.ly"
\include "bari/music.ly"
\include "bari/words.ly"
\include "bass/music.ly"
\include "bass/words.ly"
\score
{
\new ChoirStaff <<
\new Lyrics = "tenors" \with {
% this is needed for lyrics above a staff
\override VerticalAxisGroup.staff-affinity = #DOWN
}{ s1 }
\new Staff = topstaff <<
\override Staff.InstrumentName.self-alignment-X = #LEFT
\set Staff.instrumentName = \markup \left-column {
"Tenor"
"Lead"
}
\set Staff.shortInstrumentName = #""
\clef "treble_8"
\new Voice = "tenors" {
\voiceOne
<<
\global
\set midiInstrument = #"clarinet"
\tenorMusic
>>
}
\new Voice = "leads" {
\voiceTwo
<< \global \leadMusic >>
}
>>
\new Lyrics = "leads" { s1 }
\new Lyrics = "baris" \with {
% this is needed for lyrics above a staff
\override VerticalAxisGroup.staff-affinity = #DOWN
} { s1 }
\new Staff = bottomstaff <<
\override Staff.InstrumentName.self-alignment-X = #LEFT
\set Staff.instrumentName = \markup \left-column {
"Bari"
"Bass"
}
\set Staff.shortInstrumentName = #""
\clef bass
\new Voice = "baris" {
\voiceOne
<< \global \bariMusic >>
}
\new Voice = "basses" {
\voiceTwo << \global \bassMusic >>
}
>>
\new Lyrics = basses { s1 }
\context Lyrics = tenors \lyricsto tenors \tenorWords
\context Lyrics = leads \lyricsto leads \leadWords
\context Lyrics = baris \lyricsto baris \bariWords
\context Lyrics = basses \lyricsto basses \bassWords
>>
\layout {
\context {
\Staff
}
\context {
\Lyrics
\override LyricSpace.minimum-distance = #2.0
\override LyricText.font-size = \absFontSize #11
}
}
\midi {
midiChannelMapping = #'voice
\context {
\ChoirStaff
\remove "Staff_performer"
}
\context {
\Voice
\consists "Staff_performer"
}
}
}