[Top][All Lists]

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

Getting spanner length

From: Leo Correia de Verdier
Subject: Getting spanner length
Date: Thu, 17 Jan 2019 15:43:34 +0100

Dear list!

I’m all new to lily pond and trying to create a custom spanner (a couple of parallel lines connecting some of the holes of two fingering charts). To hack this together I would need the length of the spanner I’m modifying or replacing. I’ve put this piece of code together to extract it and can’t understand what mistake I’ve made:

\version "2.18.2"
\relative c'' {
  \once \override TextSpanner.stencil =
  #(lambda (grob) 
     (let (grob-X (interval-length (ly:stencil-extent (ly:grob-property grob 'stencil) X)))
       (make-line-stencil .2 1 1 grob-X 4)
  d \startTextSpan
  c b
  a \stopTextSpan

I attempted to abstract it from this piece of code

Do you have any other sources or better suggestions for custom spanners? This doesn’t have to be very complex or be able to cover line breaks.

Thanks a lot!


reply via email to

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