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