lilypond-user
[Top][All Lists]
Advanced

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

Re: Note duration line (contemporary)


From: David Nalesnik
Subject: Re: Note duration line (contemporary)
Date: Tue, 27 Nov 2012 21:43:50 -0600

Hi Oscar,

On Tue, Nov 27, 2012 at 8:58 PM, Oscar Dub <address@hidden> wrote:
>> It looks like you might be able to use a glissando and override the style to 
>> be "line", then twiddle the thickness until it looks right?
>
> Using this glissando method mentioned, does anybody know of a specific 
> override that would force the glissando line to be flat (i.e. ignore the y 
> position of the right bound and instead use the y position of the left one)?
>
> If that's not simple then I was thinking this might be achievable with a 
> simple-ish scheme callback, something like:
> \override Glissando #'bound-details #'right #'Y = >>>>>> some nice function 
> which returns the staff position of the note that the gliss is attached to 
> <<<<<<
>
> A nudge in the right direction would be great!
>

I didn't get anything to work using an override of  #'bound-details
#'right #'Y, but you can override 'after-line-breaking like so:

\version "2.17.7"

#(define flat-gliss
  (lambda (grob)
    (let ((left-Y (assoc-get 'Y (ly:grob-property grob 'left-bound-info))))
      (ly:grob-set-nested-property! grob '(right-bound-info Y) left-Y))))

\relative c'' {
  \override Glissando #'after-line-breaking = #flat-gliss
  \override Glissando #'thickness = #5
  c1\glissando
  g'\glissando
  g,
}

HTH,
David



reply via email to

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