I think I don't have to compare dot.staff-position and notehead.staff-position. I can simply check if Dots.direction is 1 or -1.
Still I'm doing something wrong here: tweakTie = #(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)) (dots (ly:grob-object notehead 'dot)) (dots-dir (ly:grob-property dots 'direction))) (if (> (length ties) 1) (begin (if (ly:grob? flag) (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))) (if (and (= dots-dir 1) (ly:grob? dots)) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (if (= tie-dir 1) (begin (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset -0.25))))) ties)) (if (and (= dots-dir -1) (ly:grob? dots)) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (if (= tie-dir -1) (begin (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset 0.25))))) ties)))) \layout { \context { \Score \override TieColumn.before-line-breaking = #tweakTie } } _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user