Hi David, when a chord doesn't have a flag, then your code doesn't work. Just
replace
<c e g c e>8~
with
<c e g c e>4~
and it won't compile. Perhaps there should be a condition in your code: "if a
note has a a flag then set Flag.Y-extent to (4 . 0)". Or maybe there is a
better way to fix this?
> %%%%%%%%%%%%%%%
>
> evenTies =
> #(lambda
> (grob)
> (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties)))
> (notehead (ly:spanner-bound (car ties) LEFT))
> (stem (ly:grob-object notehead 'stem))
> (flag (ly:grob-object stem 'flag)))
> (if (> (length ties) 1)
> (begin
> (ly:grob-set-property! flag 'Y-extent (cons 4 0))
> (for-each
> (lambda (tie)
> (ly:grob-set-nested-property! tie '(details skyline-padding) 5))
> ties)))))
>
> \layout {
> \context {
> \Score
> \override TieColumn.before-line-breaking = #evenTies
> }
> }
>
>
> \score {
>
> \relative c' {
> <c e g c e>8~
> <c e g c e>4
> c8~ c4.
> }
> }
>
> %%%%%%%%%%%%%%%%
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user