[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
\magnifyStaff, slurs, ties
From: |
Werner LEMBERG |
Subject: |
\magnifyStaff, slurs, ties |
Date: |
Sun, 31 Mar 2019 20:33:23 +0200 (CEST) |
The attached example demonstrates a bug in handling the extent of a
slur within a scaled staff. [Looking into the lilypond issues I
wasn't able to find something related; I will report the problem if no
one comes up with an issue number.]
Attached is also what I have so far to circumvent the issue, namely to
raise the slur's left position. However, I was unable to move the
slur's starting point to the left. Any ideas? Perhaps rotation and
scaling? Or something completely different?
Werner
<<
\new Staff \with {
\magnifyStaff #(magstep -5)
} {
\clef "bass" c'2..( as8 ~ | \break
as8) a2.. |
}
\new Staff {
\clef "bass" c'2..( as8 ~ |
as8) a2.. |
}
>>
#(define (broken-slur-callback grob)
(let* ((orig (ly:grob-original grob))
;; if slur has been split, get the split pieces
(siblings (if (ly:grob? orig)
(ly:spanner-broken-into orig)
'())))
(if (and (>= (length siblings) 2)
(eq? (car (last-pair siblings)) grob))
(let* ((pos (ly:grob-property grob 'positions '(1.5 . 0)))
(new-start-pos (+ (car pos) 1.5))
(end-pos (cdr pos)))
(ly:grob-set-property! grob
'positions (cons new-start-pos end-pos))))))
\layout {
\context {
\Voice
\override Slur.after-line-breaking = #broken-slur-callback
}
}
<<
\new Staff \with {
\magnifyStaff #(magstep -5)
} {
\clef "bass" c'2..( as8 ~ | \break
as8) a2.. |
}
\new Staff {
\clef "bass" c'2..( as8 ~ |
as8) a2.. |
}
>>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- \magnifyStaff, slurs, ties,
Werner LEMBERG <=