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