lilypond-user
[Top][All Lists]
Advanced

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

Re: Symmetrical ties in TieColumn


From: Karol Majewski
Subject: Re: Symmetrical ties in TieColumn
Date: Sun, 20 Oct 2013 11:22:11 +0200

Hmm... the code:

 

{

\override Tie.after-line-breaking =

#(lambda (grob)

(display (ly:grob-property grob 'control-points))

(newline))

c'1~ c'1

}

 

doesn't work for me. I see no control points (nor the numbers).

 

Meanwhile, I've found this:

===========

#(define
  (make-cross-stencil coords)
  (ly:stencil-add
    (make-line-stencil 0.1
      (-
        (car coords) 0.2
      )
      (-
        (cdr coords) 0.2)
      (+
        (car coords) 0.2)
      (+
        (cdr coords) 0.2))
    (make-line-stencil 0.1
      (-
        (car coords) 0.2)
      (+
        (cdr coords) 0.2)
      (+
        (car coords) 0.2)
      (-
        (cdr coords) 0.2))))

#(define
  (display-control-points line)
  (lambda
    (grob)
    (let
      ((stencil
          (ly:tie::print grob))
        (cps
          (ly:grob-property grob 'control-points)))
      (ly:stencil-add stencil
        (ly:stencil-in-color
          (make-cross-stencil
            (second cps)) 1 0 0)
        (ly:stencil-in-color
          (make-cross-stencil
            (third cps)) 1 0 0)
        (if
          (eq? line #t)
          (make-line-stencil 0.05
            (car
              (second cps))
            (cdr
              (second cps))
            (car
              (third cps))
            (cdr
              (third cps))) empty-stencil)))))

{

\override Tie #'stencil = #(display-control-points #t)

}

===========

 

... but it shows only the points, not the x,y_numbers.

 

 

 

Dnia 20-10-2013 o godz. 1:56 David Nalesnik napisaƂ(a):

Karol,


On Sat, Oct 19, 2013 at 6:22 PM, Karol Majewski <address@hidden> wrote:

Thank you, David, it works indeed! I know that this is not exactly what I asked for but it is a good starting point.

 

Now the question: is it possible for LilyPond to show control_point_values of ties?
 Let's say I have something like:

 

=====

\version "2.17.28"

{
c'1~ c'1
}

 

=====

 

and want LilyPond to show me all control points of that tie.

 

Is this viable?

 
Sure.  You'll notice that the function I sent works with the control points of each tie in the column,  Displaying them is straightforward:

{

\override Tie.after-line-breaking =

#(lambda (grob)

  (display (ly:grob-property grob 'control-points))

  (newline))

  c'1~ c'1

}

 





reply via email to

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