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