3 \include "lyrics-tkit.ly"
4 \include "staff-tkit.ly"
6 make-one-voice-vocal-staff =
7 #(define-music-function (name clef)
8 (voice-prefix? string?)
10 "Make a staff with one voice and lyrics beneath
11 name: the default prefix for instrument name and music
12 clef: the clef for this staff "
14 (if (make-id name "Music")
15 (make-simultaneous-music
17 (make-one-voice-staff name clef "Up")
18 (make-simultaneous-music
20 (lambda (lyrics-postfix)
21 (make-one-stanza "Below" name name lyrics-postfix))
23 (make-music 'SequentialMusic 'void #t)))
25 make-two-voice-vocal-staff =
26 #(define-music-function (name clef v1name v2name)
27 (voice-prefix? string? voice-prefix? voice-prefix?)
29 "Make a vocal staff with two voices and lyrics above and below
30 name: the prefix to the staff name
32 v1name: the prefix to the name of voice one
33 v2name: the prefix to the name of voice two "
35 (define v1music (make-id v1name "Music"))
36 (define v2music (make-id v2name "Music"))
38 (make-simultaneous-music
41 (make-two-voice-staff name clef v1name v2name)
43 (make-simultaneous-music
45 (lambda (lyrics-postfix)
46 (make-one-stanza "Above" name v1name lyrics-postfix))
50 (make-simultaneous-music
53 (lambda (lyrics-postfix)
54 (make-one-stanza "Below" name v2name lyrics-postfix))
55 lyrics-postfixes))))))))
57 make-two-vocal-staves-with-stanzas =
58 #(define-music-function
59 (upperName upperClef lowerName lowerClef
60 v1name v2name v3name v4name verses)
61 (voice-prefix? string? voice-prefix? string?
62 voice-prefix? voice-prefix? voice-prefix? voice-prefix? list?)
64 "Make two two-voice vocal staves with several stanzas between them.
65 The number of stanzas is determined by the number of populated verse names.
66 upperName: the prefix to the upper staff name
67 upperClef: the clef to use on the upper staff
68 lowerName: the prefix to the lower staff name
69 lowerClef: the clef to use on the lower staff
70 vxname: the prefix to the name of voice x, x = 1..4
71 verses: the list of verse names containing the stanzas"
73 (make-simultaneous-music
75 (make-two-voice-vocal-staff
76 upperName upperClef v1name v2name)
77 (make-simultaneous-music
81 upperName v1name v2name verse-name))
83 (make-two-voice-vocal-staff
84 lowerName lowerClef v3name v4name))))