lilypond-user
[Top][All Lists]
Advanced

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

Re: Tie shape


From: Ben
Subject: Re: Tie shape
Date: Tue, 19 Dec 2017 20:56:10 -0500
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

On 12/19/2017 8:26 PM, Pieter Terpstra wrote:
Dear people,
Another question.
Trying to change the shape of the tie in such a way that the c note becomes free from the tie overlap.
The \Shape command works on the lowest tie but not on the next?
To add the \Shape command a second time makes no difference.

Here is the example:
\score {
  \relative c' {
    g'16\rest 
  \shape #'((0 . 0) (0 . -1) (0 . -1) (0 . 0)) Tie
  \set tieWaitForNote = ##t
  b,~
  \shape #'((-3 . 0) (0 . -3) (0 . -3) (0 . 0)) Tie
  d~ g~ s8 c ~ s4 <b, d g c>
  }
}


Hi Peter,

If you can't get it to work with the shape, maybe you'd get some results with this tiecolumn approach? It's from a while ago, but I remembered it...for a rainy day :)

http://lilypond.1069038.n5.nabble.com/Shape-of-individual-ties-in-chords-td158120.html

%%%%
affect-TieColumn =
#(define-music-function (parser location offsets)(list?)
#{
  \once
    \override TieColumn #'after-line-breaking =
      #(lambda (grob)
        (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties)))
               (c-ps
                 (map
                   (lambda (tie) (ly:grob-property tie 'control-points))
                   ties)))

      (define (offset-control-points coords offsets)
       (if (null? offsets)
           (car c-ps)
           (map
             (lambda (x y) (coord-translate x y))
             coords offsets)))

       (define (help offs pts new-pts)
         (if (null? offs)
             (reverse new-pts)
             (help (cdr offs) (cdr pts)
               (cons (offset-control-points (car pts) (car offs)) new-pts))))

      (for-each
         (lambda (tie cpts) (ly:grob-set-property! tie 'control-points cpts))
         ties
         (help offsets c-ps '()))))
#})

%% crazy values taken, to show it works
{
  <fis' cis'' a''>2 ~
  \affect-TieColumn #'( ((0 . -4)  (2 . 3) (4 . 5) (6 . 7));; bottom
                        ((-1 . 0) (0 . 0) (0 . 0) (0 . 0)) ;; middle
                        ((-5 . 3) (0 . 0) (0 . 0) (0 . 0)) ;; top
                                          )
  q
}

reply via email to

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