]> git.donarmstrong.com Git - lilypond.git/blob - ly/gregorian-init.ly
(mangle_cxx_identifier): new
[lilypond.git] / ly / gregorian-init.ly
1 \version "2.7.31"
2
3 %%%%%%%%
4 %%%%%%%% shortcuts common for all styles of gregorian chant notation
5 %%%%%%%%
6
7 %
8 % declare head prefix shortcuts
9 %
10 virga =
11   \once \override NoteHead  #'virga = ##t
12 stropha =
13   \once \override NoteHead  #'stropha = ##t
14 inclinatum =
15   \once \override NoteHead  #'inclinatum = ##t
16 auctum =
17   \once \override NoteHead  #'auctum = ##t
18 descendens =
19   \once \override NoteHead  #'descendens = ##t
20 ascendens =
21   \once \override NoteHead  #'ascendens = ##t
22 pes =
23   \once \override NoteHead  #'pes-or-flexa = ##t
24 flexa =
25   \once \override NoteHead  #'pes-or-flexa = ##t
26 oriscus =
27   \once \override NoteHead  #'oriscus = ##t
28 quilisma =
29   \once \override NoteHead  #'quilisma = ##t
30 deminutum =
31   \once \override NoteHead  #'deminutum = ##t
32 linea =
33   \once \override NoteHead  #'linea = ##t
34 cavum =
35   \once \override NoteHead  #'cavum = ##t
36
37 %
38 % declare divisiones shortcuts
39 %
40 virgula = {
41   \once \override BreathingSign  #'text = #(make-musicglyph-markup "scripts.rcomma")
42   \once \override BreathingSign  #'font-size = #-2
43
44   % Workaround: add padding.  Correct fix would be spacing engine handle this.
45   \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
46
47   \breathe
48 }
49 caesura = {
50   \once \override BreathingSign  #'text = #(make-musicglyph-markup "scripts.rvarcomma")
51   \once \override BreathingSign  #'font-size = #-2
52
53   % Workaround: add padding.  Correct fix would be spacing engine handle this.
54   \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
55
56   \breathe
57 }
58 divisioMinima = {
59   \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-minima
60
61   % Workaround: add padding.  Correct fix would be spacing engine handle this.
62   \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
63
64   \breathe
65 }
66 divisioMaior = {
67   \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-maior
68   \once \override BreathingSign  #'Y-offset = #0
69
70   % Workaround: add padding.  Correct fix would be spacing engine handle this.
71   \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
72
73   \breathe
74 }
75 divisioMaxima = {
76   \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-maxima
77   \once \override BreathingSign  #'Y-offset = #0
78
79   % Workaround: add padding.  Correct fix would be spacing engine handle this.
80   \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
81
82   \breathe
83 }
84 finalis = {
85   \once \override BreathingSign  #'stencil = #ly:breathing-sign::finalis
86   \once \override BreathingSign  #'Y-offset = #0
87
88   % Workaround: add padding.  Correct fix would be spacing engine handle this.
89   \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
90
91   \breathe
92 }
93
94 %
95 % declare articulation shortcuts
96 %
97 accentus = #(make-articulation "accentus")
98 ictus = #(make-articulation "ictus")
99 semicirculus = #(make-articulation "semicirculus")
100 circulus = #(make-articulation "circulus")
101 episemInitium = #(make-span-event 'TextSpanEvent START)
102 episemFinis = #(make-span-event 'TextSpanEvent STOP)
103
104 %
105 % shortcut music functions for Liber Hymnarius neumes table
106 % (experimental)
107 %
108
109 #(define (make-ligature music)
110    (make-music 'SequentialMusic
111                'elements (append
112                           (cons
113                            (make-music 'EventChord
114                                        'elements (list
115                                                   (make-span-event 'LigatureEvent START)))
116                            (ly:music-property music 'elements))
117                           (list
118                            (make-music 'EventChord
119                                        'elements (list
120                                                   (make-span-event 'LigatureEvent STOP)))))))
121
122 ligature = #(def-music-function
123               (location music) (ly:music?)
124               (make-ligature music))
125
126 %#(define (make-script x)
127 %   (make-music 'ArticulationEvent
128 %               'articulation-type x))
129 %    
130 %#(define (add-script m x)
131 %   (if
132 %     (equal? (ly:music-property m 'name) 'EventChord)
133 %     (set! (ly:music-property m 'elements)
134 %           (cons (make-script x)
135 %                 (ly:music-property m 'elements))))
136 %   m)
137 %
138 %#(define (add-staccato m)
139 %   (add-script m "staccato"))
140 %
141 % % \applyMusic #(lambda (x) (music-map add-staccato x)) { c c }
142 %
143 % % \climacus { x y z ... }:
144 % % \[ \virga x \inclinatum y \inclinatum z ... \]
145 %
146 %#(defmacro def-climacus-function (start stop)
147 %  `(def-music-function (location music) (ly:music?)
148 %     (make-music 'SequentialMusic
149 %        'elements (list 'LigatureStartEvent
150 %                       (ly:music-deep-copy ,start)
151 %                        music
152 %                        (ly:music-deep-copy ,stop)
153 %                       'LigatureStopEvent))))
154 %climacus = #(def-climacus-function startSequentialMusic stopSequentialMusic)
155
156 %
157 % example layout block for gregorian chant notation
158 %
159
160 neumeDemoLayout = \layout {
161     interscoreline = 1
162     \context {
163         \Score
164         \remove "Bar_number_engraver"
165     }
166     \context {
167         \Staff
168         \remove "Clef_engraver"
169         \remove "Key_engraver"
170         \override StaffSymbol #'transparent = ##t
171         \remove "Time_signature_engraver"
172         \remove "Bar_engraver"
173         minimumVerticalExtent = ##f
174     }
175     \context {
176         \Voice
177         \remove Ligature_bracket_engraver
178         \consists Vaticana_ligature_engraver
179         \override NoteHead #'style = #'vaticana.punctum
180         \override Stem #'transparent = ##t
181     }
182 }