`\markLengthOn` fails if direction of `MetronomeMark` or `RehearsalMark` is `DOWN`
Originally created by: RalphBug...@gmail.com
Thomas Morley wrote :
\markLengthOn returns wrong output for MetronomeMark and
RehearsalMark, while their direction is DOWN.
The values for 'extra-spacing-height should depend on the direction of
MetronomeMark and RehearsalMark.
\version "2.19.16"
mus = {
\repeat unfold 8 c''8
\mark "RehearsalMark"
\repeat unfold 8 c''8
\tempo "MetronomeMark"
\repeat unfold 8 c''8
}
{
\markLengthOn
\mus
\break
\override Score.RehearsalMark.direction = #DOWN
\override Score.MetronomeMark.direction = #DOWN
\mus
}
A workaround might be something at the lines of:
#(define extra-spacing-height-from-direction
(lambda (grob)
(let ((dir (ly:grob-property grob 'direction)))
(ly:grob-set-property! grob 'extra-spacing-height
(cons (* dir 4) (* dir 4))))))
markLengthOn = {
\override Score.MetronomeMark.extra-spacing-width = #'(0 . 1.0)
\override Score.RehearsalMark.extra-spacing-width = #'(-0.5 . 0.5)
% Raise as much as four staff-spaces before pushing notecolumns right
\override Score.MetronomeMark.before-line-breaking =
#extra-spacing-height-from-direction
\override Score.RehearsalMark.before-line-breaking =
#extra-spacing-height-from-direction
}
Original URL: https://sourceforge.net/p/testlilyissues/issues/4320