]> git.donarmstrong.com Git - lilypond.git/blob - input/new/incipit.ly
Merge branch 'lilypond/translation' of ssh://trettig@git.sv.gnu.org/srv/git/lilypond...
[lilypond.git] / input / new / incipit.ly
1 \version "2.11.39"
2 \header {
3   lsrtags = "staff-notation,ancient-notation"
4   texidoc = "Incipits can be added using the instrument name grob, but
5 keeping separate the instrument name definition and the incipit definition."
6   doctitle = "Incipit"
7 }
8
9 incipit =
10 #(define-music-function (parser location incipit-music) (ly:music?)
11   #{
12     \once \override Staff.InstrumentName #'self-alignment-X = #RIGHT
13     \once \override Staff.InstrumentName #'self-alignment-Y = #UP
14     \once \override Staff.InstrumentName #'Y-offset = #4
15     \once \override Staff.InstrumentName #'padding = #0.3
16     \once \override Staff.InstrumentName #'stencil = 
17     #(lambda (grob)
18        (let* ((instrument-name (ly:grob-property grob 'long-text))
19               (layout (ly:output-def-clone (ly:grob-layout grob)))
20               (music (make-music 'SequentialMusic
21                       'elements (list (make-music 'ContextSpeccedMusic
22                                         'context-type 'MensuralStaff
23                                         'element (make-music 'PropertySet
24                                                    'symbol 'instrumentName
25                                                    'value instrument-name))
26                                       $incipit-music)))
27               (score (ly:make-score music))
28               (mm (ly:output-def-lookup layout 'mm))
29               (indent (ly:output-def-lookup layout 'indent))
30               (width (ly:output-def-lookup layout 'incipit-width))
31               (incipit-width (if (number? width)
32                                  (* width mm)
33                                  (* indent 0.5))))
34          (ly:output-def-set-variable! layout 'indent (- indent incipit-width))
35          (ly:output-def-set-variable! layout 'line-width indent)
36          (ly:output-def-set-variable! layout 'ragged-right #f)
37          (ly:output-def-set-variable! layout 'ragged-last #f)
38          (ly:output-def-set-variable! layout 'system-count 1)
39          (ly:score-add-output-def! score layout)
40          (set! (ly:grob-property grob 'long-text)
41                (markup #:score score))
42          (ly:system-start-text::print grob)))
43   #})
44
45 %%%%%%%%%%%%%%%%%%%%%%%%%
46
47 global = {
48   \set Score.skipBars = ##t
49   \key g \major
50   \time 4/4
51   
52   %make the staff lines invisible on staves
53   \override Staff.BarLine #'transparent = ##t
54   \skip 1*8 % the actual music
55
56   % let finis bar go through all staves
57   \override Staff.BarLine #'transparent = ##f
58
59   % finis bar
60   \bar "|."
61 }
62
63 discantusIncipit = <<
64   \new MensuralVoice = discantusIncipit <<
65     \repeat unfold 9 { s1 \noBreak }
66     {
67       \clef "neomensural-c1"
68       \key f \major
69       \time 2/2
70       c''1. 
71     }
72   >>
73   \new Lyrics \lyricsto discantusIncipit { IV- }
74 >>
75
76 discantusNotes = {
77   \transpose c' c'' {
78     \clef "treble"
79     d'2. d'4 |
80     b e' d'2 |
81     c'4 e'4.( d'8 c' b |
82     a4) b a2 |
83     b4.( c'8 d'4) c'4 |
84     \once \override NoteHead #'transparent = ##t c'1 |
85     b\breve |
86   }
87 }
88
89 discantusLyrics = \lyricmode {
90   Ju -- bi -- |
91   la -- te De -- |
92   o, om --
93   nis ter -- |
94   ra, __ om- |
95   "..." |
96   -us. |
97 }
98
99 altusIncipit = <<
100   \new MensuralVoice = altusIncipit <<
101     \repeat unfold 9 { s1 \noBreak }
102     {
103       \clef "neomensural-c3"
104       \key f \major
105       \time 2/2
106       r1 f'1. 
107     }
108   >>
109   \new Lyrics \lyricsto altusIncipit { IV- }
110 >>
111
112 altusNotes = {
113   \transpose c' c'' {
114     \clef "treble"
115     r2 g2. e4 fis g | % two bars
116     a2 g4 e |
117     fis g4.( fis16 e fis4) |
118     g1 |
119     \once \override NoteHead #'transparent = ##t g1 |
120     g\breve |
121   }
122 }
123
124 altusLyrics = \lyricmode {
125   Ju -- bi -- la -- te | % two bars
126   De -- o, om -- |
127   nis ter -- ra, |
128   "..." |
129   -us. |
130 }
131
132 tenorIncipit = <<
133   \new MensuralVoice = tenorIncipit <<
134     \repeat unfold 9 { s1 \noBreak }
135     {
136       \clef "neomensural-c4"
137       \key f \major
138       \time 2/2
139       r\longa
140       r\breve
141       r1 c'1.
142     }
143   >>
144   \new Lyrics \lyricsto tenorIncipit { IV- }
145 >>
146
147 tenorNotes = {
148   \transpose c' c' {
149     \once \override Staff.VerticalAxisGroup #'minimum-Y-extent = #'(-6 . 3)
150     \clef "treble_8"
151     R1 |
152     R1 |
153     R1 |
154     r2 d'2. d'4 b e' | % two bars
155     \once \override NoteHead #'transparent = ##t e'1 |
156     d'\breve |
157   }
158 }
159
160 tenorLyrics = \lyricmode {
161   Ju -- bi -- la -- te | % two bars
162   "..." |
163   -us. 
164 }
165
166 bassusIncipit = <<
167   \new MensuralVoice = bassusIncipit <<
168     \repeat unfold 9 { s1 \noBreak }
169     {
170       \clef "bass"
171       \key f \major
172       \time 2/2
173       %% incipit
174       r\maxima
175       f1.
176     }
177   >>
178   \new Lyrics \lyricsto bassusIncipit { IV- }
179 >>
180
181 bassusNotes = {
182   \transpose c' c' {
183     \clef "bass"
184     R1 |
185     R1 |
186     R1 |
187     R1 |
188     g2. e4 |
189     \once \override NoteHead #'transparent = ##t e1 |
190     g\breve |
191   }
192 }
193
194 bassusLyrics = \lyricmode {
195   Ju -- bi- |
196   "..." |
197   -us. 
198 }
199
200 \score {
201   <<
202     \new StaffGroup = choirStaff <<
203       \new Voice = "discantusNotes" <<
204         \global 
205         \set Staff.instrumentName = "Discantus"
206         \incipit \discantusIncipit
207         \discantusNotes
208       >>
209       \new Lyrics = "discantusLyrics" \lyricsto discantusNotes { \discantusLyrics }
210       \new Voice = "altusNotes" <<
211         \global 
212         \set Staff.instrumentName = "Altus"
213         \incipit \altusIncipit
214         \altusNotes
215       >>
216       \new Lyrics = "altusLyrics" \lyricsto altusNotes { \altusLyrics }
217       \new Voice = "tenorNotes" <<
218         \global 
219         \set Staff.instrumentName = "Tenor"
220         \incipit \tenorIncipit
221         \tenorNotes
222       >>
223       \new Lyrics = "tenorLyrics" \lyricsto tenorNotes { \tenorLyrics }
224       \new Voice = "bassusNotes" <<
225         \set Staff.instrumentName = "Bassus"
226         \incipit \bassusIncipit
227         \bassusNotes
228       >>
229     >>
230     \new Lyrics = "bassusLyrics" \lyricsto bassusNotes { \bassusLyrics } 
231     %% Keep the bass lyrics outside of the staff group to avoid bar lines
232     %% between the lyrics.
233   >>
234   \layout {
235     \context {
236       \Score
237       %% no bars in staves
238       \override BarLine #'transparent = ##t
239     }
240     %% the next three instructions keep the lyrics between the barlines
241     \context {
242       \Lyrics 
243       \consists "Bar_engraver" 
244       \override BarLine #'transparent = ##t
245     } 
246     \context { \StaffGroup \consists "Separating_line_group_engraver" }
247     \context {
248       \Voice
249       %% no slurs
250       \override Slur #'transparent = ##t
251       %% Comment in the below "\remove" command to allow line
252       %% breaking also at those barlines where a note overlaps
253       %% into the next bar.  The command is commented out in this
254       %% short example score, but especially for large scores, you
255       %% will typically yield better line breaking and thus improve
256       %% overall spacing if you comment in the following command.
257       %%\remove "Forbid_line_break_engraver"
258     }
259     indent=6\cm
260     incipit-width = 4\cm
261   }
262 }