lilypond-user
[Top][All Lists]
Advanced

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

Re: Cross-staff Glissando Stencil Error


From: David Nalesnik
Subject: Re: Cross-staff Glissando Stencil Error
Date: Fri, 22 Nov 2013 07:27:39 -0600




On Thu, Nov 21, 2013 at 11:59 PM, Keith OHara <address@hidden> wrote:


Maybe you can override the 'stencil command itself with a wrapper function.
LilyPond will call the wrapper when she is ready to draw the Glissando,
you can first call the default function (ly:line-spanner::print) to
generate the stencil, modify what it returns, and return the modified
stencil from your wrapper function to be printed.


Huh.  Could have sworn I tried this (since I've done the like a thousand times before)!  In any case, here's a working example:

 \version "2.17.95"

#(define test

  (lambda (grob)

    (let ((stil (ly:line-spanner::print grob)))

      (ly:stencil-scale stil 1 0.8))))


\score {

  \new PianoStaff <<

    \new Staff = "right" {

      \once \override Glissando.stencil = #test

      c''2. \glissando

      \change Staff = "left"

      c,4 |

    }

    \new Staff = "left" {\clef bass s1}

  >>

}


\markup ooops



reply via email to

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