4 %%%%%%%% shortcuts common for all styles of gregorian chant notation
8 % Declare memorable shortcuts for special unicode characters
9 % that are used in chant notation.
12 % unicode 0132 (latin capital ligature IJ)
14 IIJ = \lyricmode { IIJ }
16 % unicode 0133 (latin small ligature ij)
18 iij = \lyricmode { iij }
20 % unicode 2123 (versicle)
21 versus = \lyricmode { ℣ }
23 % unicode 211F (response)
24 responsum = \lyricmode { ℟ }
27 % Declare head prefix shortcuts.
30 \once \override NoteHead #'virga = ##t
32 \once \override NoteHead #'stropha = ##t
34 \once \override NoteHead #'inclinatum = ##t
36 \once \override NoteHead #'auctum = ##t
38 \once \override NoteHead #'descendens = ##t
40 \once \override NoteHead #'ascendens = ##t
42 \once \override NoteHead #'pes-or-flexa = ##t
44 \once \override NoteHead #'pes-or-flexa = ##t
46 \once \override NoteHead #'oriscus = ##t
48 \once \override NoteHead #'quilisma = ##t
50 \once \override NoteHead #'deminutum = ##t
52 \once \override NoteHead #'linea = ##t
54 \once \override NoteHead #'cavum = ##t
57 % Declare divisiones shortcuts.
60 \once \override BreathingSign #'text = #(make-musicglyph-markup "scripts.rcomma")
61 \once \override BreathingSign #'font-size = #-2
63 % Workaround: add padding. Correct fix would be spacing engine handle this.
64 \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
69 \once \override BreathingSign #'text = #(make-musicglyph-markup "scripts.rvarcomma")
70 \once \override BreathingSign #'font-size = #-2
72 % Workaround: add padding. Correct fix would be spacing engine handle this.
73 \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
78 \once \override BreathingSign #'stencil = #ly:breathing-sign::divisio-minima
80 % Workaround: add padding. Correct fix would be spacing engine handle this.
81 \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
86 \once \override BreathingSign #'stencil = #ly:breathing-sign::divisio-maior
87 \once \override BreathingSign #'Y-offset = #0
89 % Workaround: add padding. Correct fix would be spacing engine handle this.
90 \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
95 \once \override BreathingSign #'stencil = #ly:breathing-sign::divisio-maxima
96 \once \override BreathingSign #'Y-offset = #0
98 % Workaround: add padding. Correct fix would be spacing engine handle this.
99 \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
104 \once \override BreathingSign #'stencil = #ly:breathing-sign::finalis
105 \once \override BreathingSign #'Y-offset = #0
107 % Workaround: add padding. Correct fix would be spacing engine handle this.
108 \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
114 % Declare articulation shortcuts.
116 accentus = #(make-articulation "accentus")
117 ictus = #(make-articulation "ictus")
118 semicirculus = #(make-articulation "semicirculus")
119 circulus = #(make-articulation "circulus")
120 episemInitium = #(make-span-event 'TextSpanEvent START)
121 episemFinis = #(make-span-event 'TextSpanEvent STOP)
123 %%% TODO: A ligature head postfix that indicates that an
124 %%% augmentum dot should be appended to the right end of
125 %%% the surrounding ligature. [Not yet implemented.]
130 % Declare shortcut music functions for Liber Hymnarius neumes
131 % table (experimental).
134 #(define (make-ligature music)
135 (make-music 'SequentialMusic
138 (make-music 'EventChord
140 (make-span-event 'LigatureEvent START)))
141 (ly:music-property music 'elements))
143 (make-music 'EventChord
145 (make-span-event 'LigatureEvent STOP)))))))
147 ligature = #(define-music-function
148 (location music) (ly:music?)
149 (make-ligature music))
151 %#(define (make-script x)
152 % (make-music 'ArticulationEvent
153 % 'articulation-type x))
155 %#(define (add-script m x)
157 % (equal? (ly:music-property m 'name) 'EventChord)
158 % (set! (ly:music-property m 'elements)
159 % (cons (make-script x)
160 % (ly:music-property m 'elements))))
163 %#(define (add-staccato m)
164 % (add-script m "staccato"))
166 % % \applyMusic #(lambda (x) (music-map add-staccato x)) { c c }
168 % % \climacus { x y z ... }:
169 % % \[ \virga x \inclinatum y \inclinatum z ... \]
171 %#(defmacro def-climacus-function (start stop)
172 % `(define-music-function (location music) (ly:music?)
173 % (make-music 'SequentialMusic
174 % 'elements (list 'LigatureStartEvent
175 % (ly:music-deep-copy ,start)
177 % (ly:music-deep-copy ,stop)
178 % 'LigatureStopEvent))))
179 %climacus = #(def-climacus-function startSequentialMusic stopSequentialMusic)
182 % Declare default layout; here for Vaticana style. In case there will
183 % be additional styles, we may want to create style-specific .ly files
184 % for inclusion (e.g. vaticana-init.ly), move the style-dependent stuff
185 % over there, leave the style-independent Gregorian stuff here, and let
186 % the style-specific file (vaticana-init.ly) include this file. The
187 % user then will have to include vaticana-init.ly instead of
194 %%% TODO: should raggedright be the default?
198 %%% FIXME: line-thickness should be set here to a slightly
199 %%% thicker value as the default; but we can not set it here,
200 %%% since neither \staff-space nor #staff-space is yet defined
201 %%% when lily comes across the following line.
202 %line-thickness = \staff-space / 7.0
206 \override StaffSymbol #'color = #red
207 \override LedgerLineSpanner #'color = #red
211 \remove "Bar_number_engraver"
214 %%% FIXME: Musicologically seen, timing should be set to #f.
215 %%% Unfortunately, setting it to #f will result in no
216 %%% line-breakable items being created, such that the whole
217 %%% music will end up in a single line. Therefore, we
218 %%% currently set it to #t, until the ligature code is fixed
219 %%% to automatically insert breakable items.
224 %%% FIXME: Setting barAlways to #t would fix the above
225 %%% "timing = ##t" problem, but, surprisingly, it increases
226 %%% the space between ligatures. Hence, we set it to #f.
230 \override SpacingSpanner #'packed-spacing = ##t
233 %%% TODO: Play around with the following SpacingSpanner
234 %%% settings to yield better spacing between ligatures.
236 %%% FIXME: setting #'spacing-increment to a small value
237 %%% causes tons of "programming error: adding reverse spring,
238 %%% setting to unit" messages.
240 %\override SpacingSpanner #'shortest-duration-space = #0
241 %\override SpacingSpanner #'average-spacing-wishes = ##f
242 %\override SpacingSpanner #'spacing-increment = #0.0
243 %\override SpacingSpanner #'uniform-stretching = ##t
248 % neumeDemoLayout defines a layout block suitable for notating pure
249 % Vaticana style neumes without any other notation symbols such as
250 % staff lines or clefs. This layout is useful for engraving neumes
251 % tables, such as that one in the lilypond manual section on
252 % Gregorian ligatures, or for educational works.
254 neumeDemoLayout = \layout {
258 \remove "Bar_number_engraver"
262 \remove "Clef_engraver"
263 \remove "Key_engraver"
264 \override StaffSymbol #'transparent = ##t
265 \remove "Time_signature_engraver"
266 \remove "Bar_engraver"
267 minimumVerticalExtent = ##f
271 \remove Ligature_bracket_engraver
272 \consists Vaticana_ligature_engraver
273 \override NoteHead #'style = #'vaticana.punctum
274 \override Stem #'transparent = ##t