LSR: Update.
[lilypond.git] / input / new / incipit.ly
blob5664d32cb1a9194505d8809e0d9368d4578f1937
1 \version "2.12.0"
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"
9 incipit =
10 #(define-music-function (parser location incipit-music) (ly:music?)
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 (ly:grob-set-property! grob 'long-text
41 (markup #:score score))
42 (ly:system-start-text::print grob)))
43 #})
45 %%%%%%%%%%%%%%%%%%%%%%%%%
47 global = {
48 \set Score.skipBars = ##t
49 \key g \major
50 \time 4/4
52 % the actual music
53 \skip 1*8
55 % let finis bar go through all staves
56 \override Staff.BarLine #'transparent = ##f
58 % finis bar
59 \bar "|."
62 discantusIncipit = <<
63 \new MensuralVoice = "discantusIncipit" <<
64 \repeat unfold 9 { s1 \noBreak }
66 \clef "neomensural-c1"
67 \key f \major
68 \time 2/2
69 c''1.
72 \new Lyrics \lyricsto discantusIncipit { IV- }
75 discantusNotes = {
76 \transpose c' c'' {
77 \clef "treble"
78 d'2. d'4 |
79 b e' d'2 |
80 c'4 e'4.( d'8 c' b |
81 a4) b a2 |
82 b4.( c'8 d'4) c'4 |
83 \once \override NoteHead #'transparent = ##t
84 c'1 |
85 b\breve |
89 discantusLyrics = \lyricmode {
90 Ju -- bi -- |
91 la -- te De -- |
92 o, om --
93 nis ter -- |
94 ra, __ om- |
95 "..." |
96 -us. |
99 altusIncipit = <<
100 \new MensuralVoice = "altusIncipit" <<
101 \repeat unfold 9 { s1 \noBreak }
103 \clef "neomensural-c3"
104 \key f \major
105 \time 2/2
106 r1 f'1.
109 \new Lyrics \lyricsto altusIncipit { IV- }
112 altusNotes = {
113 \transpose c' c'' {
114 \clef "treble"
115 % two measures
116 r2 g2. e4 fis g |
117 a2 g4 e |
118 fis g4.( fis16 e fis4) |
119 g1 |
120 \once \override NoteHead #'transparent = ##t
121 g1 |
122 g\breve |
126 altusLyrics = \lyricmode {
127 % two measures
128 Ju -- bi -- la -- te |
129 De -- o, om -- |
130 nis ter -- ra, |
131 "..." |
132 -us. |
135 tenorIncipit = <<
136 \new MensuralVoice = "tenorIncipit" <<
137 \repeat unfold 9 { s1 \noBreak }
139 \clef "neomensural-c4"
140 \key f \major
141 \time 2/2
142 r\longa
143 r\breve
144 r1 c'1.
147 \new Lyrics \lyricsto tenorIncipit { IV- }
150 tenorNotes = {
151 \transpose c' c' {
152 \once \override Staff.VerticalAxisGroup #'minimum-Y-extent = #'(-6 . 3)
153 \clef "treble_8"
154 R1 |
155 R1 |
156 R1 |
157 % two measures
158 r2 d'2. d'4 b e' |
159 \once \override NoteHead #'transparent = ##t
160 e'1 |
161 d'\breve |
165 tenorLyrics = \lyricmode {
166 % two measures
167 Ju -- bi -- la -- te |
168 "..." |
169 -us.
172 bassusIncipit = <<
173 \new MensuralVoice = "bassusIncipit" <<
174 \repeat unfold 9 { s1 \noBreak }
176 \clef "bass"
177 \key f \major
178 \time 2/2
179 %% incipit
180 r\maxima
184 \new Lyrics \lyricsto bassusIncipit { IV- }
187 bassusNotes = {
188 \transpose c' c' {
189 \clef "bass"
190 R1 |
191 R1 |
192 R1 |
193 R1 |
194 g2. e4 |
195 \once \override NoteHead #'transparent = ##t
196 e1 |
197 g\breve |
201 bassusLyrics = \lyricmode {
202 Ju -- bi- |
203 "..." |
204 -us.
207 \score {
209 \new StaffGroup = choirStaff <<
210 \new Voice = "discantusNotes" <<
211 \global
212 \set Staff.instrumentName = #"Discantus"
213 \incipit \discantusIncipit
214 \discantusNotes
216 \new Lyrics = "discantusLyrics" \lyricsto discantusNotes { \discantusLyrics }
217 \new Voice = "altusNotes" <<
218 \global
219 \set Staff.instrumentName = #"Altus"
220 \incipit \altusIncipit
221 \altusNotes
223 \new Lyrics = "altusLyrics" \lyricsto altusNotes { \altusLyrics }
224 \new Voice = "tenorNotes" <<
225 \global
226 \set Staff.instrumentName = #"Tenor"
227 \incipit \tenorIncipit
228 \tenorNotes
230 \new Lyrics = "tenorLyrics" \lyricsto tenorNotes { \tenorLyrics }
231 \new Voice = "bassusNotes" <<
232 \global
233 \set Staff.instrumentName = #"Bassus"
234 \incipit \bassusIncipit
235 \bassusNotes
237 \new Lyrics = "bassusLyrics" \lyricsto bassusNotes { \bassusLyrics }
240 \layout {
241 \context {
242 \Score
243 %% no bar lines in staves or lyrics
244 \override BarLine #'transparent = ##t
246 %% the next two instructions keep the lyrics between the bar lines
247 \context {
248 \Lyrics
249 \consists "Bar_engraver"
250 \consists "Separating_line_group_engraver"
252 \context {
253 \Voice
254 %% no slurs
255 \override Slur #'transparent = ##t
256 %% Comment in the below "\remove" command to allow line
257 %% breaking also at those bar lines where a note overlaps
258 %% into the next measure. The command is commented out in this
259 %% short example score, but especially for large scores, you
260 %% will typically yield better line breaking and thus improve
261 %% overall spacing if you comment in the following command.
262 %%\remove "Forbid_line_break_engraver"
264 indent = 6\cm
265 incipit-width = 4\cm