Commit c6926964 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Fixed error in insrument part, move dynamics shifting to oly

parent 830d9552
...@@ -201,7 +201,7 @@ IKyrieCorIIMusic = \relative g' { ...@@ -201,7 +201,7 @@ IKyrieCorIIMusic = \relative g' {
g2\f g4 g4 | % 13 g2\f g4 g4 | % 13
c,2. r4 | % 14 c,2. r4 | % 14
g'2 g4 g4 | % 15 g'2 g4 g4 | % 15
g,2 r4 r4 | % 16 g,2. r4 | % 16 % FIXED: In CorII score g,2 r4 (i.e. one beat is missing)
g'2 g4 g4 | % 17 g'2 g4 g4 | % 17
d4 r4 r2 | R1*7 | % 25 d4 r4 r2 | R1*7 | % 25
e2. \f r4 | R1 | % 27 e2. \f r4 | R1 | % 27
......
...@@ -125,12 +125,6 @@ MaleClef = \clef "bass" ...@@ -125,12 +125,6 @@ MaleClef = \clef "bass"
} }
dynamicsX = #(define-music-function (parser location offset) (number?)
#{
\once \override DynamicText #'X-offset = $offset
\once \override DynamicLineSpanner #'Y-offset = #0
#})
dynamicsXY = #(define-music-function (parser location offsetX offsetY) dynamicsXY = #(define-music-function (parser location offsetX offsetY)
(number? number?) (number? number?)
#{ #{
...@@ -148,16 +142,6 @@ dynamicsInside = #(define-music-function (parser location offsetX shiftY height) ...@@ -148,16 +142,6 @@ dynamicsInside = #(define-music-function (parser location offsetX shiftY height)
\once \override DynamicText #'extra-offset = #(cons 0 $shiftY ) \once \override DynamicText #'extra-offset = #(cons 0 $shiftY )
#}) #})
% dynamicsAllInside = #(define-music-function (parser location offsetX shiftY)
% (number? number?)
% #{
% \once \override DynamicText #'X-offset = $offsetX
% % \once \override DynamicLineSpanner #'Y-offset = #0
% \once \override DynamicText #'Y-extent = #(cons 1 -1)
% \once \override DynamicLineSpanner #'Y-extent = #(cons 1 -1)
% \once \override DynamicText #'extra-offset = #(cons 0 $shiftY )
% #})
dynamicsInsideX = #(define-music-function (parser location offsetX) (number?) dynamicsInsideX = #(define-music-function (parser location offsetX) (number?)
#{ #{
\once \override DynamicText #'X-offset = $offsetX \once \override DynamicText #'X-offset = $offsetX
...@@ -167,37 +151,15 @@ dynamicsInsideX = #(define-music-function (parser location offsetX) (number?) ...@@ -167,37 +151,15 @@ dynamicsInsideX = #(define-music-function (parser location offsetX) (number?)
\once \override DynamicText #'extra-offset = #(cons 0 $shiftY ) \once \override DynamicText #'extra-offset = #(cons 0 $shiftY )
#}) #})
% ignoreItem = #(define-music-function (parser location type) (symbol?)
% #{
% \once \override $type #'Y-extent = #(cons +0 -0.01)
% #})
%
% ignoreFermata = \ignoreItem #'Script
% ignoreMMNumber = \ignoreItem #'MultiMeasureRestNumber
% ignoreSlur = \ignoreItem #'Slur
% Move the dynamic sign inside the staff to a fixed staff-relative position
% posY (where 0 means vertically starts at the middle staff line)
dynamicsAllInside = #(define-music-function (parser location offsetX posY)
(number? number?)
#{
% Invalid y-extent -> hidden from skyline calculation and collisions
\once \override DynamicLineSpanner #'Y-extent = #(cons +0 -0.01)
% move by X offset and to fixed Y-position (use Y-offset of parent!)
\once \override DynamicText #'X-offset = $offsetX
\once \override DynamicText #'Y-offset =
$(lambda (grob)
(let* ((head (ly:grob-parent grob Y))
(offset (ly:grob-property head 'Y-offset)))
(- posY offset (- 0.6))))
\once \override DynamicLineSpanner #'Y-offset = $posY
#})
dynamicsUpInside = #(define-music-function (parser location offsetX) (number?)
((ly:music-function-extract dynamicsAllInside) parser location offsetX 1.5)
)
dynamicsDownInside = #(define-music-function (parser location offsetX) (number?)
((ly:music-function-extract dynamicsAllInside) parser location offsetX -3.5)
)
hairpinOffset = #(define-music-function (parser location posY) (number?)
#{
\once \override DynamicLineSpanner #'Y-offset = $posY
\once \override DynamicLineSpanner #'Y-extent = #(cons +0 -0.01)
#})
ignoreFermata = #(define-music-function (parser location) () ignoreFermata = #(define-music-function (parser location) ()
#{ #{
...@@ -214,21 +176,3 @@ ignoreSlur = #(define-music-function (parser location) () ...@@ -214,21 +176,3 @@ ignoreSlur = #(define-music-function (parser location) ()
\once \override Slur #'Y-extent = #(cons +0 -0.01) \once \override Slur #'Y-extent = #(cons +0 -0.01)
#}) #})
#(define ((line-break-offset before after) grob)
(let* ((orig (ly:grob-original grob))
; All siblings if line-broken:
(siblings (if (ly:grob? orig) (ly:spanner-broken-into orig) '() )))
(if (>= (length siblings) 2)
; We have been line-broken
(if (eq? (car (last-pair siblings)) grob)
; Last sibling:
(ly:grob-set-property! grob 'Y-offset after)
; Others get the before value:
(ly:grob-set-property! grob 'Y-offset before)
)
)
)
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment