lilypond-user
[Top][All Lists]
Advanced

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

Re: TextSpanner custom line


From: Artur Wrona
Subject: Re: TextSpanner custom line
Date: Thu, 18 Feb 2021 00:50:05 +0100

Dnia 2021-02-17, o godz. 16:41:24
David Nalesnik <david.nalesnik@gmail.com> napisaƂ(a):

> Don't forget to "reply all"
> 

Sorry...
I'll reply all. Write me, that well or wrong...

Well... thank you - very helpful people I prepared line spanner useful
to drum part. Bravura font is required because special symbol. I think,
that best will if I share this code for other users.

%%%

\version "2.21.5"
%%%
wiggleCircularChar = \markup {
  \concat
  {
    \scale #'(1.5 . 1)
\override #'(font-name . "Bravura")  \char ##xEAC3
  }
}

#(define (wiggleCircular grob)
   (if (ly:stencil? (ly:line-spanner::print grob))
       (let* ((stencil (ly:line-spanner::print grob))
              ;(dot (ly:font-get-glyph (ly:grob-default-font grob)
"scripts.turn")) (X-ext (ly:stencil-extent stencil X))
              (Y-ext (ly:stencil-extent stencil Y))
              ;(width 0.1)
              (len (interval-length X-ext))
              (sym-stencil (grob-interpret-markup grob
wiggleCircularChar)) (sym-X-ext (ly:stencil-extent sym-stencil X))
              (sym-len (interval-length sym-X-ext)))
         (ly:stencil-translate
          (grob-interpret-markup grob
            (markup
             (#:pattern (inexact->exact (round (/ len sym-len)))
               X 0
               (markup #:scale (cons 1 1) wiggleCircularChar))))
          (cons (interval-start X-ext) (interval-start Y-ext))))
       #f))
%%%%
{
  \override Score.TextSpanner.stencil = #wiggleCircular
  \override Score.TextSpanner.to-barline = ##t
  c'1\startTextSpan
 c'
 c'
 c'
 c'
 c'
 c'
 c'
 c'
 c'
 c'
 c'
 c'
 c'\stopTextSpan
}

%%%

Attachment: spannerizeWiggleCircular.ly
Description: Text Data


reply via email to

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