]> git.donarmstrong.com Git - lilypond.git/blob - ly/gregorian-init.ly
The grand \paper -> \layout, \bookpaper -> \paper renaming.
[lilypond.git] / ly / gregorian-init.ly
1 \version "2.3.16"
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  #'print-function = #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  #'print-function = #Breathing_sign::divisio_maior
68   \once \override BreathingSign  #'Y-offset-callbacks = #'()
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  #'print-function = #Breathing_sign::divisio_maxima
77   \once \override BreathingSign  #'Y-offset-callbacks = #'()
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  #'print-function = #Breathing_sign::finalis
86   \once \override BreathingSign  #'Y-offset-callbacks = #'()
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 %#(define (make-script x)
109 %   (make-music 'ArticulationEvent
110 %               'articulation-type x))
111 %    
112 %#(define (add-script m x)
113 %   (if
114 %     (equal? (ly:music-property m 'name) 'EventChord)
115 %     (set! (ly:music-property m 'elements)
116 %           (cons (make-script x)
117 %                 (ly:music-property m 'elements))))
118 %   m)
119 %
120 %#(define (add-staccato m)
121 %   (add-script m "staccato"))
122 %
123 % % \applymusic #(lambda (x) (music-map add-staccato x)) { c c }
124 %
125 % % \climacus { x y z ... }:
126 % % \[ \virga x \inclinatum y \inclinatum z ... \]
127 %
128 %#(defmacro def-climacus-function (start stop)
129 %  `(def-music-function (location music) (ly:music?)
130 %     (make-music 'SequentialMusic
131 %        'elements (list 'LigatureStartEvent
132 %                       (ly:music-deep-copy ,start)
133 %                        music
134 %                        (ly:music-deep-copy ,stop)
135 %                       'LigatureStopEvent))))
136 %climacus = #(def-climacus-function startSequentialMusic stopSequentialMusic)
137
138 %
139 % example layout block for gregorian chant notation
140 %
141
142 neumeDemoLayout = \layout {
143     interscoreline = 1
144     \context {
145         \Score
146         \remove "Bar_number_engraver"
147     }
148     \context {
149         \Staff
150         \remove "Clef_engraver"
151         \remove "Key_engraver"
152         \override StaffSymbol #'transparent = ##t
153         \remove "Time_signature_engraver"
154         \remove "Bar_engraver"
155         minimumVerticalExtent = ##f
156     }
157     \context {
158         \Voice
159         \remove Ligature_bracket_engraver
160         \consists Vaticana_ligature_engraver
161         \override NoteHead #'style = #'vaticana_punctum
162         \override Stem #'transparent = ##t
163     }
164 }