]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/gregorian-init.ly
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / ly / gregorian-init.ly
index 32099830c7bdba770396686895b05fb45e00d07f..23495a0e6404e8ee6376b31a2fd229f2c7d76946 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.16"
+\version "2.7.39"
 
 %%%%%%%%
 %%%%%%%% shortcuts common for all styles of gregorian chant notation
@@ -38,7 +38,7 @@ cavum =
 % declare divisiones shortcuts
 %
 virgula = {
-  \once \override BreathingSign  #'text = #(make-musicglyph-markup "scripts-rcomma")
+  \once \override BreathingSign  #'text = #(make-musicglyph-markup "scripts.rcomma")
   \once \override BreathingSign  #'font-size = #-2
 
   % Workaround: add padding.  Correct fix would be spacing engine handle this.
@@ -47,7 +47,7 @@ virgula = {
   \breathe
 }
 caesura = {
-  \once \override BreathingSign  #'text = #(make-musicglyph-markup "scripts-rvarcomma")
+  \once \override BreathingSign  #'text = #(make-musicglyph-markup "scripts.rvarcomma")
   \once \override BreathingSign  #'font-size = #-2
 
   % Workaround: add padding.  Correct fix would be spacing engine handle this.
@@ -56,7 +56,7 @@ caesura = {
   \breathe
 }
 divisioMinima = {
-  \once \override BreathingSign  #'print-function = #Breathing_sign::divisio_minima
+  \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-minima
 
   % Workaround: add padding.  Correct fix would be spacing engine handle this.
   \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
@@ -64,8 +64,8 @@ divisioMinima = {
   \breathe
 }
 divisioMaior = {
-  \once \override BreathingSign  #'print-function = #Breathing_sign::divisio_maior
-  \once \override BreathingSign  #'Y-offset-callbacks = #'()
+  \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-maior
+  \once \override BreathingSign  #'Y-offset = #0
 
   % Workaround: add padding.  Correct fix would be spacing engine handle this.
   \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
@@ -73,8 +73,8 @@ divisioMaior = {
   \breathe
 }
 divisioMaxima = {
-  \once \override BreathingSign  #'print-function = #Breathing_sign::divisio_maxima
-  \once \override BreathingSign  #'Y-offset-callbacks = #'()
+  \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-maxima
+  \once \override BreathingSign  #'Y-offset = #0
 
   % Workaround: add padding.  Correct fix would be spacing engine handle this.
   \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
@@ -82,8 +82,8 @@ divisioMaxima = {
   \breathe
 }
 finalis = {
-  \once \override BreathingSign  #'print-function = #Breathing_sign::finalis
-  \once \override BreathingSign  #'Y-offset-callbacks = #'()
+  \once \override BreathingSign  #'stencil = #ly:breathing-sign::finalis
+  \once \override BreathingSign  #'Y-offset = #0
 
   % Workaround: add padding.  Correct fix would be spacing engine handle this.
   \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
@@ -91,6 +91,12 @@ finalis = {
   \breathe
 }
 
+augmentum = {
+  %%% TODO: A ligature head postfix that indicates that an
+  %%% augmentum dot should be appended to the right end of
+  %%% the surrounding ligature.  [Not yet implemented.]
+}
+
 %
 % declare articulation shortcuts
 %
@@ -105,6 +111,24 @@ episemFinis = #(make-span-event 'TextSpanEvent STOP)
 % shortcut music functions for Liber Hymnarius neumes table
 % (experimental)
 %
+
+#(define (make-ligature music)
+   (make-music 'SequentialMusic
+              'elements (append
+                         (cons
+                          (make-music 'EventChord
+                                      'elements (list
+                                                 (make-span-event 'LigatureEvent START)))
+                          (ly:music-property music 'elements))
+                         (list
+                          (make-music 'EventChord
+                                      'elements (list
+                                                 (make-span-event 'LigatureEvent STOP)))))))
+
+ligature = #(define-music-function
+             (location music) (ly:music?)
+             (make-ligature music))
+
 %#(define (make-script x)
 %   (make-music 'ArticulationEvent
 %               'articulation-type x))
@@ -120,13 +144,13 @@ episemFinis = #(make-span-event 'TextSpanEvent STOP)
 %#(define (add-staccato m)
 %   (add-script m "staccato"))
 %
-% % \applymusic #(lambda (x) (music-map add-staccato x)) { c c }
+% % \applyMusic #(lambda (x) (music-map add-staccato x)) { c c }
 %
 % % \climacus { x y z ... }:
 % % \[ \virga x \inclinatum y \inclinatum z ... \]
 %
 %#(defmacro def-climacus-function (start stop)
-%  `(def-music-function (location music) (ly:music?)
+%  `(define-music-function (location music) (ly:music?)
 %     (make-music 'SequentialMusic
 %        'elements (list 'LigatureStartEvent
 %                      (ly:music-deep-copy ,start)
@@ -135,11 +159,68 @@ episemFinis = #(make-span-event 'TextSpanEvent STOP)
 %                      'LigatureStopEvent))))
 %climacus = #(def-climacus-function startSequentialMusic stopSequentialMusic)
 
+\layout {
+    indent = 0.0
+    packed = ##t
+
+    %%% TODO: should raggedright be the default?
+    %ragged-right = ##t
+    ragged-last = ##t
+
+    %%% FIXME: line-thickness should be set here to a slightly
+    %%% thicker value as the default; but we can not set it here,
+    %%% since neither \staff-space nor #staff-space is yet defined
+    %%% when lily comes across the following line.
+    %line-thickness = \staff-space / 7.0
+
+    \context {
+       \VaticanaStaff
+        \override StaffSymbol #'color = #red
+        \override LedgerLineSpanner #'color = #red
+    }
+    \context {
+       \Score
+       \remove "Bar_number_engraver"
+
+       %%%
+       %%% FIXME: Musicologically seen, timing should be set to #f.
+       %%% Unfortunately, setting it to #f will result in no
+       %%% line-breakable items being created, such that the whole
+       %%% music will end up in a single line.  Therefore, we
+       %%% currently set it to #t, until the ligature code is fixed
+       %%% to automatically insert breakable items.
+       %%%
+       timing = ##t
+
+       %%%
+       %%% FIXME: Setting barAlways to #t would fix the above
+       %%% "timing = ##t" problem, but, surprisingly, it increases
+       %%% the space between ligatures.  Hence, we set it to #f.
+       %%%
+       barAlways = ##f
+
+       \override SpacingSpanner #'packed-spacing = ##t
+
+       %%%
+       %%% TODO: Play around with the following SpacingSpanner
+       %%% settings to yield better spacing between ligatures.
+       %%%
+       %%% FIXME: setting #'spacing-increment to a small value
+       %%% causes tons of "programming error: adding reverse spring,
+       %%% setting to unit" messages.
+       %%%
+       %\override SpacingSpanner #'shortest-duration-space = #0
+       %\override SpacingSpanner #'average-spacing-wishes = ##f
+       %\override SpacingSpanner #'spacing-increment = #0.0
+       %\override SpacingSpanner #'uniform-stretching = ##t
+    }
+}
+
 %
-% example paper block for gregorian chant notation
+% example layout block for gregorian chant notation
 %
 
-neumeDemoPaper = \paper {
+neumeDemoLayout = \layout {
     interscoreline = 1
     \context {
        \Score
@@ -158,7 +239,7 @@ neumeDemoPaper = \paper {
        \Voice
        \remove Ligature_bracket_engraver
        \consists Vaticana_ligature_engraver
-       \override NoteHead #'style = #'vaticana_punctum
+       \override NoteHead #'style = #'vaticana.punctum
        \override Stem #'transparent = ##t
     }
 }