-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
common.ly.mako
769 lines (708 loc) · 21.6 KB
/
common.ly.mako
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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
<%
# change to the tonality you want... C is the default for obvious reasons...
# TONALITY="ees"
# TONALITY="bes"
TONALITY="c"
# Want to have readable symbol on title page
# (judgment call: I prefer 'G flat' to 'F sharp')
tonalityNames = {"c": "C", "cis": "C♯", "d": "D", "ees":"E♭", "e": "E", "f": "F", "ges": "G♭", "g": "G", "aes": "A♭", "a": "A", "bes": "B♭", "b": "B" }
# An 'E flat' book has tunes transposed so that when played on E flat instrument they work. That means they're trasponsed _down_ a minor third,
# since E flat is a minor third above c
#
# also, judgement call; transpose to the nearest pitch.
def tonalityTransposePitch(pitch) :
keys = list(tonalityNames)
pitchIndex = keys.index(pitch)
transposeIndex=pitchIndex
if (pitchIndex != 0) :
# seems a little convoluted, should be more elegant!
transposeIndex = 12-pitchIndex
result = keys[transposeIndex]
if (transposeIndex >= 6):
result = result + ','
return result
# maybe overkill with the dictionary and function, but here we set globals
TONALITYName=tonalityNames[TONALITY]
TONALITYTransposePitch=tonalityTransposePitch(TONALITY)
%>
<%def name="defs()">
%% end verbatim - this comment is a hack to prevent texinfo.tex
%% from choking on non-European UTF-8 subsets
%% this version tag will keep me compiling only on this version of lilypond.
%%=====================================================================
<%
import datetime # for datetime.now().strftime()
import os # for getuid
import pwd # for getpwuid
import socket # for gethostname
import subprocess # for subprocess.check_output
gattr['date']=datetime.datetime.now().strftime('%T %d-%m-%Y')
gattr['year']=datetime.datetime.now().strftime('%Y')
gattr['username']=pwd.getpwuid(os.getuid())[0]
if os.path.exists(".git"):
tag=subprocess.check_output(['git','describe','--abbrev=0','--always']).decode().strip()
desc=subprocess.check_output(['git','describe','--tags','--always']).decode().strip()
commits=subprocess.check_output(['git','log','--pretty=format:\'\'']).decode().split('\n').__len__()
else:
tag="no-tag"
desc="no-desc"
commits="no-commits"
gattr['gittag']=tag
gattr['gitdesc']=desc
gattr['gitcommits']=commits
gattr['hostname']=socket.gethostname()
gattr['kernel']=os.uname()[0]+' '+os.uname()[2]
gattr['copyrightvalstudy']='-- no copyright notice for study materials --'
gattr['lyricsInMidi']=False
%>
\version "${gattr['lilypond_version']}"
%% lets define a variable to hold the formatted build date (man 3 strftime):
%%date=#(strftime "%T %d-%m-%Y" (localtime (current-time)))
%%lilypond_version=#(lilypond-version)
%% setting instruments for midi generation (bah - this doesn't work...)
%%=====================================================================
%%\set ChordNames.midiInstrument = #"acoustic grand"
%%\set Staff.midiInstrument = #"flute"
%%\set PianoStaff.instrumentName = #"acoustic grand"
%% do not show chords unless they change...
%%\set chordChanges = ##t
%% number of staffs per page (this does not work because of my breaks)
%%\paper {
%% system-count = #7
%%}
\paper {
%% reduce spaces between systems and the bottom (taken from the lilypond
%% documentation and found the relevant variable)
%% the result of this is that I can fit 8 single staffs in one page
%% which is ideal for Jazz (think 32 bar divided into 8 lines of 4 bars each...).
%% I should really only apply this thing for Jazz tunes but that is a TODO item.
%% default is 4\mm - 3 already causes 8 staffs to take 2 pages
between-system-padding = 2\mm
%% default is 20\mm
%% between-system-space = 16\mm
%% ragged-last-bottom = ##f
%% ragged-bottom = ##f
%% make lilypond increase the distance of the footer from the bottom of the page
%% it seems that if you don't do something like this you're going to have
%% a real problem seeing the footer in postscript printing....
%%bottom-margin = 2.5\cm
%% from /usr/share/lilypond/2.12.3/ly/titling-init.ly
%% to stop lilypond from printing footers...
oddFooterMarkup = \markup {}
%% prevent lilypond from printing the headers...
scoreTitleMarkup = \markup {}
bookTitleMarkup = \markup {}
}
\layout {
%% don't have the first line indented
indent = 0.0 \cm
%% don't know what this is (taken from Laurent Martelli...)
%%textheight = 1.5\cm
\context {
\Score
%% change the size of the text fonts
%%\override LyricText #'font-family = #'typewriter
\override LyricText #'font-size = #'-2
%% set the style of the chords to Jazz - I don't see this making any effect
\override ChordName #'style = #'jazz
%%\override ChordName #'word-space = #2
%% set the chord size and font
%%\override ChordName #'font-series = #'bold
%%\override ChordName #'font-family = #'roman
%%\override ChordName #'font-size = #-1
%% don't show bar numbers (for jazz it makes it too cluttery)
\remove "Bar_number_engraver"
}
}
%% reduce the font size (taken from the lilypond info documentation, default is 20)
#(set-global-staff-size 17.82)
%% There is no need to set the paper size to a4 since it is the default.
%% make lilypond use paper of size a4 (Is this the default ?!?)
%%#(set-default-paper-size "a4")
%%)
%% Don't have textedit:// links for every note in the pdf file.
%% This reduces the size of the pdf by a lot
\pointAndClickOff
%% chord related matters
myChordDefinitions={
<c ees ges bes des' fes' aes'>-\markup \super {7alt}
<c e g bes f'>-\markup \super {7sus}
<c e g bes d f'>-\markup \super {9sus}
<c e g f'>-\markup \super {sus}
<c ees ges bes>-\markup { "m" \super { "7 " \flat "5" } }
<c ees ges beses>-\markup { "dim" \super { "7" } }
<c ees ges>-\markup { "dim" }
%%<c e g b>-\markup { "maj7" }
<c e gis bes d'>-\markup { \super { "9 " \sharp "5" } }
<c e g bes d' a'>-\markup \super {13}
<c e g bes d' fis'>-\markup { \super { "9 " \sharp "11" } }
}
myChordExceptions=#(append
(sequential-music-to-chord-exceptions myChordDefinitions #t)
ignatzekExceptions
)
%% some macros to be reused all over
%% =====================================================================
myBreak=\break
%% do line breaks really matter?
myEndLine=\break
%%myEndLine={}
myEndLineVoltaNotLast={}
myEndLineVoltaLast=\break
myEndLineVolta=\break
partBar=\bar "||"
endBar=\bar "|."
startBar=\bar ".|"
startRepeat=\bar "|:"
endRepeat=\bar ":|"
startTune={}
endTune=\bar "|."
myFakeEndLine={}
mySegno=\mark \markup { \musicglyph #"scripts.segno" }
myCoda=\mark \markup { \musicglyph #"scripts.coda" }
%% some functions to be reused all over
%% =====================================================================
%% A wrapper for section markers that allows us to control their formatting
%% You can have a circle instead of a box using:
%% \mark \markup { \circle #mark }
myMark =
#(define-music-function
(parser location mark)
(markup?)
#{
\mark \markup { \box #mark }
#})
myWordMark =
#(define-music-function
(parser location mark)
(markup?)
#{
\mark \markup { \box #mark }
#})
%% grace that does appoggiatura
%%\grace $notes
myGrace = #(define-music-function (parser location notes) (ly:music?) #{ \appoggiatura $notes #})
%% grace that does nothing
%%myGrace = #(define-music-function (parser location notes) (ly:music?) #{ #})
%% this is a macro that * really * breaks lines. You don't really need this since a regular \break will work
%% AS LONG AS you have the '\remove Bar_engraver' enabled...
hardBreak={ \bar "" \break }
%% a macro to make vertical space
verticalSpace=\markup { \null }
%% macros to help in parenthesizing chords
%% see the playground area for openbook and http://lilypond.1069038.n5.nabble.com/Parenthesizing-chord-names-td44370.html
#(define (left-parenthesis-ignatzek-chord-names in-pitches bass inversion context) (markup #:line ("(" (ignatzek-chord-names in-pitches bass inversion context))))
#(define (right-parenthesis-ignatzek-chord-names in-pitches bass inversion context) (markup #:line ((ignatzek-chord-names in-pitches bass inversion context) ")")))
#(define (parenthesis-ignatzek-chord-names in-pitches bass inversion context) (markup #:line ("(" (ignatzek-chord-names in-pitches bass inversion context) ")")))
LPC = { \once \set chordNameFunction = #left-parenthesis-ignatzek-chord-names }
RPC = { \once \set chordNameFunction = #right-parenthesis-ignatzek-chord-names }
OPC = { \once \set chordNameFunction = #parenthesis-ignatzek-chord-names }
%% some macros for marking parts of jazz tunes
%% =====================================================================
startSong={}
%% If we want endings of parts to be denoted by anything we need
%% to find a smarter function that this since this will tend
%% to make other things disapper (repeat markings etc)
%%endSong=\bar "|."
endSong={}
startPart={}
%% If we want endings of parts to be denoted by anything we need
%% to find a smarter function that this since this will tend
%% to make other things disapper (repeat markings etc)
%% endPart=\bar "||"
endPart={}
startChords={
%% this causes chords that do not change to disappear...
\set chordChanges = ##t
%% use my own chord exceptions
\set chordNameExceptions = #myChordExceptions
}
endChords={}
</%def>
<%def name="clearVars()">
<%
attributes.reset()
%>
</%def>
%% lets emit the definitions
${self.defs()}
%% lets always include guitar definitions
\include "predefined-guitar-fretboards.ly"
% if gattr['book']:
%% book header
%%\book {
%% this is the title page
\bookpart {
\markup {
\column {
\null
\null
\null
\null
\null
\null
\null
\null
\null
\null
\fill-line { \fontsize #11 \bold "OpenBook (${TONALITYName})"}
\null
\null
\fill-line { \larger \larger \bold "An open source Jazz real book" }
\null
\null
\null
\fill-line {
\huge \bold \concat {
"Website: "
\with-url #"https://veltzer.github.io/openbook" https://veltzer.github.io/openbook
}
}
\null
\fill-line {
\huge \bold \concat {
"Development: "
\with-url #"https://github.com/veltzer/openbook" https://github.com/veltzer/openbook
}
}
\null
\fill-line {
\huge \bold \concat {
"Lead developer: Mark Veltzer "
"<" \with-url #"mailto:mark.veltzer@gmail.com" mark.veltzer@gmail.com ">"
}
}
\null
\fill-line {
\huge \bold \concat {
"Typesetting copyright: © 2011-"
${gattr['year']}
" Mark Veltzer "
"<" \with-url #"mailto:mark.veltzer@gmail.com" mark.veltzer@gmail.com ">"
}
}
\null
\fill-line { \huge \bold "Tune copyright: © belong to their respective holders" }
\null
\null
\null
\fill-line { \small "Git tag: ${gattr['gittag']}" }
\fill-line { \small "Git describe: ${gattr['gitdesc']}" }
\fill-line { \small "Git commits: ${gattr['gitcommits']}" }
\fill-line { \small "Build date: ${gattr['date']}" }
\fill-line { \small "Build user: ${gattr['username']}" }
\fill-line { \small "Build host: ${gattr['hostname']}" }
\fill-line { \small "Build kernel: ${gattr['kernel']}" }
\fill-line { \small "Lilypond version: ${gattr['lilypond_version']}" }
\fill-line { \small "Number of tunes: ${len(gattr['files'])}" }
\null
\null
\null
}
}
\score {
<<
\new Staff="Melody" {
\new Voice="Voice"
\relative c' {
\time 4/4
\key f \major
\set fontSize = #-3
f8 e f c r4 a'8 aes | a c, r e~ e g f e | g f a bes a f g ees
}
}
>>
\layout {
#(layout-set-staff-size 35)
indent = 2.6\cm
}
}
}
% endif
% if gattr['toc']:
\markuplist \table-of-contents
% if gattr['break_after_toc']:
\pageBreak
% endif
% endif
%% from here everything needs to go into a loop
% for file in gattr['files']:
%% include anything the user wants before the bookpart starts
<%include file="/${file}" args="part='Defs'"/>
% if gattr['parts']:
\bookpart {
% endif
%% this causes the variables to be defined...
${self.clearVars()}
<%include file="/${file}" args="part='Vars'"/>
%% now play with the variables that depend on language
<%
if 'composer' not in attributes:
if 'poet' not in attributes:
add=''
else:
add=' / '+attributes['poet']
else:
if 'poet' not in attributes:
add=' / '+attributes['composer']
else:
if attributes['composer']==attributes['poet']:
add=' / '+attributes['composer']
else:
add=' / '+attributes['composer']+', '+attributes['poet']
scratch['tocname']=attributes['title']+add
%>
% if 'copyright' not in attributes:
% if 'heb' in attributes and attributes['heb']:
<%
scratch['copyright']=u'-- עיזרו לי למלא את שורת זכויות היוצרים הזו --'
%>
% else:
<%
scratch['copyright']='-- help me fill it out this copyright notice --'
%>
% endif
% else:
% if 'heb' in attributes and attributes['heb']:
<%
scratch['copyright']=u'זכויות יוצרים © '+attributes['copyright']
%>
% else:
<%
scratch['copyright']=u'Copyright © '+attributes['copyright']
%>
% endif
% endif
%% calculate the tag line
% if heb in attributes and attributes['heb']:
<%
scratch['tagline']=u'תווי על ידי '+attributes['typesetter']+u', נבנה בתאריך'+gattr['date']+u', תימון על ידי lilypond '+gattr['lilypond_version']
%>
% else:
<%
scratch['tagline']='Typeset by '+attributes['typesetter']+', Built at '+gattr['date']+', Engraved by lilypond '+gattr['lilypond_version']
%>
% endif
%% calculate the typesetby
% if heb in attributes and attributes['heb']:
<%
scratch['typesetby']=u'תווי על ידי '+attributes['typesetter']
%>
% else:
<%
scratch['typesetby']='Typeset by '+attributes['typesetter']
%>
% endif
<%doc>
% if attributes.get_working_version()['doGuitar']:
%%\include "predefined-guitar-fretboards.ly"
% endif
</%doc>
% if gattr['toc']:
\tocItem \markup "${scratch['tocname']}"
% endif
<%doc>
%% emitting the header...
\header {
dedication="${attributes['dedication']}"
title="${attributes['title']}"
subtitle="${attributes['subtitle']}"
subsubtitle="${attributes['subsubtitle']}"
composer="${attributes['composer']}"
style="${attributes['style']}"
piece="${attributes['piece']}"
opus="${attributes['opus']}"
poet="${attributes['poet']}"
copyright="${scratch['copyright']}"
copyrightextra="${scratch['copyrightextra']}"
completion="${attributes['completion']}"
uuid="${attributes['uuid']}"
structure="${attributes['structure']}"
idyoutuberemark1="${attributes['idyoutuberemark1']}"
idyoutube1="${attributes['idyoutube1']}"
idyoutuberemark2="${attributes['idyoutuberemark2']}"
idyoutube2="${attributes['idyoutube2']}"
lyricsurl="${attributes['lyricsurl']}"
}
</%doc>
<%
# this block handles poet and composer. The idea is that the author of the tune
# just fills in the raw poet/composer data and this takes care of the nice printing...
if 'poet' in attributes and 'composer' in attributes and attributes['poet']==attributes['composer']:
if 'heb' in attributes and attributes['heb']:
scratch['fullcomposer']=u'מילים ולחן: '+attributes['poet']
else:
scratch['fullcomposer']='Lyrics and Music by '+attributes['poet']
scratch['fullpoet']=''
else:
if 'poet' not in attributes:
scratch['fullpoet']=''
else:
if 'heb' in attributes and attributes['heb']:
scratch['fullpoet']=u'מלים: '+attributes['poet']
else:
scratch['fullpoet']='Lyrics by '+attributes['poet']
if 'composer' not in attributes:
scratch['fullcomposer']=''
else:
if 'heb' in attributes and attributes['heb']:
scratch['fullcomposer']=u'לחן: '+attributes['composer']
else:
scratch['fullcomposer']='Music by '+attributes['composer']
%>
%% taken from "/usr/share/lilypond/2.12.3/ly/titling-init.ly"
\markup {
\column {
% if 'dedication' in attributes:
\fill-line { "${attributes['dedication']}" }
% endif
\override #'(baseline-skip . 3.5)
\column {
\huge \larger \bold
\fill-line { \larger "${attributes['title']}" }
% if 'subtitle' in attributes:
\fill-line { \large \smaller \bold \larger "${attributes['subtitle']}" }
% endif
% if 'subsubtitle' in attributes:
\fill-line { \smaller \bold "${attributes['subsubtitle']}" }
% endif
\fill-line {
"${scratch['fullpoet']}"
"${scratch['fullcomposer']}"
}
\fill-line {
% if 'piece' in attributes:
"${attributes['piece']}"
% endif
% if 'opus' in attributes:
"${attributes['opus']}"
% else:
""
% endif
}
}
}
}
\noPageBreak
% if attributes.get_working_version()['doOwn']==False:
%% include the preparatory stuff, if there is any
% if attributes.get_working_version()['doPrep']:
<%include file="/${file}" args="part='Prep'"/>
% endif
%% calculate the vars
<%
Chords='Chords'+attributes.get_default_version_name()
Voice='Voice'+attributes.get_default_version_name()
Lyrics='Lyrics'+attributes.get_default_version_name()
Lyricsmore='Lyricsmore'+attributes.get_default_version_name()
Lyricsmoremore='Lyricsmoremore'+attributes.get_default_version_name()
%>
% if gattr['inline']==False:
%% lets emit the blocks -- use specified pitch
% if attributes.get_working_version()['doChords']:
Chords=\transpose c ${TONALITYTransposePitch} {<%include file="/${file}" args="part=Chords"/>}
% endif
% if attributes.get_working_version()['doVoice']:
Voice=\transpose c ${TONALITYTransposePitch} {\relative c'
<%include file="/${file}" args="part=Voice"/>
}
% endif
% if attributes.get_working_version()['doLyrics']:
Lyrics=<%include file="/${file}" args="part=Lyrics"/>
% endif
% if attributes.get_working_version()['doLyricsmore']:
Lyricsmore=<%include file="/${file}" args="part=Lyricsmore"/>
% endif
% if attributes.get_working_version()['doLyricsmoremore']:
Lyricsmoremore=<%include file="/${file}" args="part=Lyricsmoremore"/>
% endif
% endif
%% score for printing
\score {
<<
% if attributes.get_working_version()['doChords']:
\new ChordNames="Chords"
% if attributes.get_working_version()['doChordBars']:
%% this adds a bar engraver which does not always come with chords
%% I didn'f find a way to put this with the chords themselves...
\with {
%% for lilypond 2.12
%%\override BarLine #'bar-size = #4
\override BarLine #'bar-extent = #'(-2 . 2)
\consists "Bar_engraver"
}
% else:
\with {
\remove "Bar_engraver"
}
% endif
%% # transpose with 'inline' is true!
% if gattr['inline']:
\transpose c ${TONALITYTransposePitch} {<%include file="/${file}" args="part=Chords"/>}
% endif
% if gattr['inline']==False:
\Chords
% endif
% endif
%% this thing will only engrave voltas. This is required to put the volta under the chords.
%% No great harm will happen if you don't put it, only the voltas will be above the chords.
%%\new Staff \with {
%% \consists "Volta_engraver"
%%}
% if attributes.get_working_version()['doVoice']:
\new Staff="Melody" {
\new Voice="Voice"
%% # transpose with 'inline' is true!
% if gattr['inline']:
\transpose c ${TONALITYTransposePitch} { \relative c'
<%include file="/${file}" args="part=Voice"/> }
% endif
% if gattr['inline']==False:
\Voice
% endif
}
% endif
% if attributes.get_working_version()['doLyrics']:
\new Lyrics="Lyrics" \lyricsto "Voice" {
% if gattr['inline']:
<%include file="/${file}" args="part=Lyrics"/>
% endif
% if gattr['inline']==False:
\Lyrics
% endif
}
% endif
% if attributes.get_working_version()['doLyricsmore']:
\new Lyrics="Lyrics" \lyricsto "Voice" {
% if gattr['inline']:
<%include file="/${file}" args="part=Lyricsmore"/>
% endif
% if gattr['inline']==False:
\Lyricsmore
% endif
}
% endif
% if attributes.get_working_version()['doLyricsmoremore']:
\new Lyrics="Lyrics" \lyricsto "Voice" {
% if gattr['inline']:
<%include file="/${file}" args="part=Lyricsmoremore"/>
% endif
% if gattr['inline']==False:
\Lyricsmoremore
% endif
}
% endif
>>
\layout {
}
}
% if gattr['midi']:
%% score for midi
\score {
\unfoldRepeats
<<
% if attributes.get_working_version()['doChords']:
\new ChordNames="Chords"
% if gattr['inline']:
<%include file="/${file}" args="part=Chords"/>
% endif
% if gattr['inline']==False:
\Chords
% endif
% endif
% if attributes.get_working_version()['doVoice']:
\new Staff="Melody" {
\new Voice="Voice"
% if gattr['inline']:
\relative c'
<%include file="/${file}" args="part=Voice"/>
% endif
% if gattr['inline']==False:
\Voice
% endif
}
% endif
% if gattr['lyricsInMidi']:
% if attributes.get_working_version()['doLyrics']:
\new Lyrics="Lyrics" \lyricsto "Voice" {
% if gattr['inline']:
<%include file="/${file}" args="part=Lyrics"/>
% endif
% if gattr['inline']==False:
\Lyrics
% endif
}
% endif
% if attributes.get_working_version()['doLyricsmore']:
\new Lyrics="Lyrics" \lyricsto "Voice" {
% if gattr['inline']:
<%include file="/${file}" args="part=Lyricsmore"/>
% endif
% if gattr['inline']==False:
\Lyricsmore
% endif
}
% endif
% if attributes.get_working_version()['doLyricsmoremore']:
\new Lyrics="Lyrics" \lyricsto "Voice" {
% if gattr['inline']:
<%include file="/${file}" args="part=Lyricsmoremore"/>
% endif
% if gattr['inline']==False:
\Lyricsmoremore
% endif
}
% endif
% endif
>>
\midi {
}
}
% endif
% endif
% if attributes.get_working_version()['doOwn']:
<%include file="/${file}" args="part='Own'"/>
% endif
% if attributes.get_working_version()['doExtra']:
<%include file="/${file}" args="part='Extra'"/>
% endif
\noPageBreak
\markup \column {
%% just a little space
\null
\fill-line {
\smaller \smaller { "${scratch['copyright']}" }
}
% if gattr['book']:
\fill-line {
\smaller \smaller { "${scratch['typesetby']}" }
}
% endif
% if gattr['book']==False:
\fill-line {
\smaller \smaller { "${scratch['tagline']}" }
}
\fill-line {
\smaller \smaller { \with-url #"https://veltzer.github.io/openbook" https://veltzer.github.io/openbook }
}
% endif
}
% if gattr['space_after_tune']:
%% this is just a small space, maybe we should replace this with a page break?
%% TODO: at the very end of the book this should not appear.
\markup \column {
\null
\null
}
%endif
% if gattr['break_after_tune']:
\pageBreak
% endif
% if gattr['parts']:
}
% endif
% endfor
% if gattr['book']:
%% book footer
%%}
% endif