On Jan 4, 2013, at 11:10 PM, Paul Morris <p...@paulwmorris.com> 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
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to