lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tie settings question


From: Karol Majewski
Subject: Re: Tie settings question
Date: Tue, 25 Oct 2016 22:23:32 +0200

OK, I've added this. Stem-dir is no longer needed.

It doesn't work. I think something is wrong with notehead definition:

tweakTie =
#(lambda
  (grob)
  (let*
    ((ties
        (ly:grob-array->list
          (ly:grob-object grob 'ties)))
      (notehead
        (ly:spanner-bound
          (car ties) LEFT))
      (notehead-pos
        (ly:grob-property notehead 'staff-position))
      (stem
        (ly:grob-object notehead 'stem))
      (flag
        (ly:grob-object stem 'flag))
      (dot
        (ly:grob-object notehead 'dot))
      (dot-pos
        (ly:grob-property dot 'staff-position)))
    (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
        (> dot-pos notehead-pos)
        (ly:grob? dot))
      (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
        (< dot-pos notehead-pos)
        (ly:grob? dot))
      (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))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]