4 %%%%%%%% shortcuts common for all styles of gregorian chant notation
8 % declare head prefix shortcuts
11 \once \override NoteHead #'virga = ##t
13 \once \override NoteHead #'stropha = ##t
15 \once \override NoteHead #'inclinatum = ##t
17 \once \override NoteHead #'auctum = ##t
19 \once \override NoteHead #'descendens = ##t
21 \once \override NoteHead #'ascendens = ##t
23 \once \override NoteHead #'pes-or-flexa = ##t
25 \once \override NoteHead #'pes-or-flexa = ##t
27 \once \override NoteHead #'oriscus = ##t
29 \once \override NoteHead #'quilisma = ##t
31 \once \override NoteHead #'deminutum = ##t
33 \once \override NoteHead #'linea = ##t
35 \once \override NoteHead #'cavum = ##t
38 % declare divisiones shortcuts
41 \once \override BreathingSign #'text = #(make-musicglyph-markup "scripts.rcomma")
42 \once \override BreathingSign #'font-size = #-2
44 % Workaround: add padding. Correct fix would be spacing engine handle this.
45 \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
50 \once \override BreathingSign #'text = #(make-musicglyph-markup "scripts.rvarcomma")
51 \once \override BreathingSign #'font-size = #-2
53 % Workaround: add padding. Correct fix would be spacing engine handle this.
54 \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
59 \once \override BreathingSign #'stencil = #ly:breathing-sign::divisio-minima
61 % Workaround: add padding. Correct fix would be spacing engine handle this.
62 \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
67 \once \override BreathingSign #'stencil = #ly:breathing-sign::divisio-maior
68 \once \override BreathingSign #'Y-offset = #0
70 % Workaround: add padding. Correct fix would be spacing engine handle this.
71 \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
76 \once \override BreathingSign #'stencil = #ly:breathing-sign::divisio-maxima
77 \once \override BreathingSign #'Y-offset = #0
79 % Workaround: add padding. Correct fix would be spacing engine handle this.
80 \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
85 \once \override BreathingSign #'stencil = #ly:breathing-sign::finalis
86 \once \override BreathingSign #'Y-offset = #0
88 % Workaround: add padding. Correct fix would be spacing engine handle this.
89 \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
95 %%% TODO: A ligature head postfix that indicates that an
96 %%% augmentum dot should be appended to the right end of
97 %%% the surrounding ligature. [Not yet implemented.]
101 % declare articulation shortcuts
103 accentus = #(make-articulation "accentus")
104 ictus = #(make-articulation "ictus")
105 semicirculus = #(make-articulation "semicirculus")
106 circulus = #(make-articulation "circulus")
107 episemInitium = #(make-span-event 'TextSpanEvent START)
108 episemFinis = #(make-span-event 'TextSpanEvent STOP)
111 % shortcut music functions for Liber Hymnarius neumes table
115 #(define (make-ligature music)
116 (make-music 'SequentialMusic
119 (make-music 'EventChord
121 (make-span-event 'LigatureEvent START)))
122 (ly:music-property music 'elements))
124 (make-music 'EventChord
126 (make-span-event 'LigatureEvent STOP)))))))
128 ligature = #(define-music-function
129 (location music) (ly:music?)
130 (make-ligature music))
132 %#(define (make-script x)
133 % (make-music 'ArticulationEvent
134 % 'articulation-type x))
136 %#(define (add-script m x)
138 % (equal? (ly:music-property m 'name) 'EventChord)
139 % (set! (ly:music-property m 'elements)
140 % (cons (make-script x)
141 % (ly:music-property m 'elements))))
144 %#(define (add-staccato m)
145 % (add-script m "staccato"))
147 % % \applyMusic #(lambda (x) (music-map add-staccato x)) { c c }
149 % % \climacus { x y z ... }:
150 % % \[ \virga x \inclinatum y \inclinatum z ... \]
152 %#(defmacro def-climacus-function (start stop)
153 % `(define-music-function (location music) (ly:music?)
154 % (make-music 'SequentialMusic
155 % 'elements (list 'LigatureStartEvent
156 % (ly:music-deep-copy ,start)
158 % (ly:music-deep-copy ,stop)
159 % 'LigatureStopEvent))))
160 %climacus = #(def-climacus-function startSequentialMusic stopSequentialMusic)
166 %%% TODO: should raggedright be the default?
170 %%% FIXME: line-thickness should be set here to a slightly
171 %%% thicker value as the default; but we can not set it here,
172 %%% since neither \staff-space nor #staff-space is yet defined
173 %%% when lily comes across the following line.
174 %line-thickness = \staff-space / 7.0
178 \override StaffSymbol #'color = #red
179 \override LedgerLineSpanner #'color = #red
183 \remove "Bar_number_engraver"
186 %%% FIXME: Musicologically seen, timing should be set to #f.
187 %%% Unfortunately, setting it to #f will result in no
188 %%% line-breakable items being created, such that the whole
189 %%% music will end up in a single line. Therefore, we
190 %%% currently set it to #t, until the ligature code is fixed
191 %%% to automatically insert breakable items.
196 %%% FIXME: Setting barAlways to #t would fix the above
197 %%% "timing = ##t" problem, but, surprisingly, it increases
198 %%% the space between ligatures. Hence, we set it to #f.
202 \override SpacingSpanner #'packed-spacing = ##t
205 %%% TODO: Play around with the following SpacingSpanner
206 %%% settings to yield better spacing between ligatures.
208 %%% FIXME: setting #'spacing-increment to a small value
209 %%% causes tons of "programming error: adding reverse spring,
210 %%% setting to unit" messages.
212 %\override SpacingSpanner #'shortest-duration-space = #0
213 %\override SpacingSpanner #'average-spacing-wishes = ##f
214 %\override SpacingSpanner #'spacing-increment = #0.0
215 %\override SpacingSpanner #'uniform-stretching = ##t
220 % example layout block for gregorian chant notation
223 neumeDemoLayout = \layout {
227 \remove "Bar_number_engraver"
231 \remove "Clef_engraver"
232 \remove "Key_engraver"
233 \override StaffSymbol #'transparent = ##t
234 \remove "Time_signature_engraver"
235 \remove "Bar_engraver"
236 minimumVerticalExtent = ##f
240 \remove Ligature_bracket_engraver
241 \consists Vaticana_ligature_engraver
242 \override NoteHead #'style = #'vaticana.punctum
243 \override Stem #'transparent = ##t