X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fgregorian-init.ly;h=3a99d82f937e362d2b3025645a44a08b9b5c8c4d;hb=def21b306e2b8fa2d5630fab0878e9922e197f0c;hp=6f3f06e16e6071e220878216488a6829bf517959;hpb=2c42c84ce0bc8d623802408eadcabe548c0f775d;p=lilypond.git diff --git a/ly/gregorian-init.ly b/ly/gregorian-init.ly index 6f3f06e16e..3a99d82f93 100644 --- a/ly/gregorian-init.ly +++ b/ly/gregorian-init.ly @@ -1,8 +1,9 @@ -\version "2.7.39" +%{ + Shortcuts common for all styles of gregorian chant notation. + $Id$ +%} -%%%%%%%% -%%%%%%%% shortcuts common for all styles of gregorian chant notation -%%%%%%%% +\version "2.10.0" % % Declare memorable shortcuts for special unicode characters @@ -17,11 +18,42 @@ IIJ = \lyricmode { IIJ } ij = \lyricmode { ij } iij = \lyricmode { iij } -% unicode 2123 (versicle) -versus = \lyricmode { ℣ } - -% unicode 211F (response) -responsum = \lyricmode { ℟ } +% +% Given some music that represents lyrics, add a prefix to the first +% lyric event. +% +% TODO: Robustify this function. For example, this function works +% correctly for "\versus { some lyrics }", but it barfs with a wrong type +% argument error for e.g. "\versus some lyrics". +% +#(define (add-prefix-to-lyrics prefix music) + (make-music + 'SequentialMusic + 'elements (append + (cons + (let* ((elems (car (ly:music-property music 'elements))) + (props (ly:music-mutable-properties elems)) + (events (filter (lambda (x) + (equal? (car x) 'elements)) + props)) + (first-evt (cadar events)) + (first-syllable (ly:prob-property first-evt 'text)) + (first-duration (ly:prob-property first-evt 'duration))) + (make-music + 'LyricEvent + 'duration first-duration + 'text (string-append prefix first-syllable))) + (cdr (ly:music-property music 'elements)))))) + +% Add unicode 2123 (versicle) as prefix to lyrics. +versus = +#(define-music-function (parser location music) (ly:music?) + (add-prefix-to-lyrics "℣" music)) + +% Add unicode 211F (response) as prefix to lyrics. +responsum = +#(define-music-function (parser location music) (ly:music?) + (add-prefix-to-lyrics "℟" music)) % % Declare head prefix shortcuts. @@ -117,14 +149,16 @@ accentus = #(make-articulation "accentus") ictus = #(make-articulation "ictus") semicirculus = #(make-articulation "semicirculus") circulus = #(make-articulation "circulus") -episemInitium = #(make-span-event 'TextSpanEvent START) -episemFinis = #(make-span-event 'TextSpanEvent STOP) -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.] -} +episemInitium = \startTextSpan +episemFinis = \stopTextSpan +% +% \augmentum increases the dot-count value of all note heads to which +% it is applied by one. +% +augmentum = +#(define-music-function (parser location expr) (ly:music?) + (shift-duration-log expr 0 1)) % % Declare shortcut music functions for Liber Hymnarius neumes @@ -237,6 +271,7 @@ ligature = #(define-music-function %%% causes tons of "programming error: adding reverse spring, %%% setting to unit" messages. %%% + %\override SpacingSpanner #'base-shortest-duration = #(ly:make-moment 1 4) %\override SpacingSpanner #'shortest-duration-space = #0 %\override SpacingSpanner #'average-spacing-wishes = ##f %\override SpacingSpanner #'spacing-increment = #0.0 @@ -264,7 +299,7 @@ neumeDemoLayout = \layout { \override StaffSymbol #'transparent = ##t \remove "Time_signature_engraver" \remove "Bar_engraver" - minimumVerticalExtent = ##f + \override VerticalAxisGroup #'minimum-Y-extent = ##f } \context { \Voice