lilypond-user
[Top][All Lists]
Advanced

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

Re: Tweaking notehead direction in chords


From: Paul Morris
Subject: Re: Tweaking notehead direction in chords
Date: Sat, 5 Jan 2013 11:05:36 -0500

On Jan 4, 2013, at 11:10 PM, Paul Morris <address@hidden> wrote:

> Without looking into it any further, my best guess is that calculating the 
> stem width does not work because the stem grob has not been generated before 
> the ] is reached, or something like that?  

By commenting things out, I identified the following as the first line that 
causes the error:

 (stem-stil (ly:grob-property stem 'stencil))

So it seems like the stem grob's stencil may not have been created yet, at the 
point where we are trying to get its width?

I tried the following, which moves the attempt to access the stencil behind the 
"ly:stencil?" check, but it returned the same error anyway.

  (stem (ly:grob-object grob 'stem))
  (stem-thick (ly:grob-property stem 'thickness 1.3))
  ;; (stem-stil (ly:grob-property stem 'stencil))
  (stem-x-width (if (ly:stencil? (ly:grob-property stem 'stencil))
                 (interval-length (ly:stencil-extent (ly:grob-property stem 
'stencil) X))
                 ;; if no stem-stencil use 'thickness-property
                 (/ stem-thick 10)))
  (stem-dir (ly:grob-property stem 'direction))
  ;; Calculate a value to compensate the stem-extension
  (stem-x-corr 
    (map 
      (lambda (q)
         (+ 1 1)
         )
       nh-duration-log)))


Cheers,
-Paul


reply via email to

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