]> git.donarmstrong.com Git - lilypond.git/blob - ly/vocal-tkit.ly
Web-ja: update introduction
[lilypond.git] / ly / vocal-tkit.ly
1 %\version "2.19.22"
2
3 \include "lyrics-tkit.ly"
4 \include "staff-tkit.ly"
5
6 make-one-voice-vocal-staff =
7 #(define-music-function (name clef)
8    (voice-prefix? string?)
9
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 "
13
14   (if (make-id name "Music")
15       (make-simultaneous-music
16        (list
17         (make-one-voice-staff name clef "Up")
18         (make-simultaneous-music
19           (reverse (map
20             (lambda (lyrics-postfix)
21               (make-one-stanza "Below" name name lyrics-postfix))
22               lyrics-postfixes)))))
23       (make-music 'SequentialMusic 'void #t)))
24
25 make-two-voice-vocal-staff =
26 #(define-music-function (name clef v1name v2name)
27    (voice-prefix? string? voice-prefix? voice-prefix?)
28
29   "Make a vocal staff with two voices and lyrics above and below
30      name: the prefix to the staff name
31      clef: the clef to use
32    v1name: the prefix to the name of voice one
33    v2name: the prefix to the name of voice two "
34
35   (define v1music (make-id v1name "Music"))
36   (define v2music (make-id v2name "Music"))
37
38   (make-simultaneous-music
39    (delq! #f
40     (list
41      (make-two-voice-staff name clef v1name v2name)
42      (and v1music
43           (make-simultaneous-music
44            (map
45             (lambda (lyrics-postfix)
46               (make-one-stanza "Above" name v1name lyrics-postfix))
47             lyrics-postfixes)))
48
49      (and v2music
50           (make-simultaneous-music
51            (reverse
52             (map
53              (lambda (lyrics-postfix)
54                (make-one-stanza "Below" name v2name lyrics-postfix))
55              lyrics-postfixes))))))))
56
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?)
63
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"
72
73   (make-simultaneous-music
74    (list
75     (make-two-voice-vocal-staff
76      upperName upperClef v1name v2name)
77     (make-simultaneous-music
78      (map
79       (lambda (verse-name)
80         (make-one-stanza
81          upperName v1name v2name verse-name))
82         verses))
83     (make-two-voice-vocal-staff
84      lowerName lowerClef v3name v4name))))
85