lilypond-user
[Top][All Lists]
Advanced

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

Re: override stencil question


From: Rama Gottfried
Subject: Re: override stencil question
Date: Thu, 7 Mar 2013 22:05:39 -0800

here is a working version of the bezier glissando (I just had too many 
coordinates in my curveto command).

still trying to find some reference on the grob-interpret-markup function -- it 
seems there are a few of these grob- functions that are not in the 
documentation list of scheme functions.

-- rama



\version "2.17.13"

#(define (path-gliss grob)
        (if (ly:stencil? (ly:line-spanner::print grob))
        (let* ((stencil (ly:line-spanner::print grob))
            (X-ext (ly:stencil-extent stencil X))
            (Y-ext (ly:stencil-extent stencil Y))
            (width (interval-length X-ext))
            (len (interval-length Y-ext)))
        
       (ly:stencil-translate 
         (grob-interpret-markup grob
           (markup
             (#:path 0.2
               (list (list 'moveto 0 0)
               (list 'curveto 0 0 4 4 width len)))))
         (cons (interval-start X-ext) (interval-start Y-ext))))
      #f))            


\relative c' {
        \override Stem #'direction = #UP

        \override NoteHead #'transparent = ##t
        \override NoteHead #'no-ledgers = ##t
        \override NoteHead #'stem-attachment = #'(0 . -0.25)

        \override Glissando #'bound-details = #'((right (0 . 0) 
(end-on-accidental . #f) (padding . 0.)) (left (0 . 0) (padding . 0.)))

        \override Glissando #'stencil = #path-gliss

         c2\glissando e f\glissando g'
}


reply via email to

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