calc stem direction

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

calc stem direction

Jan-Peter Voigt
Hi list,

in a scheme-engraver I want to get the stem-direction in the
acknowledger-slot. When I use ly:stem::calc-direction the calculated
direction is not always the visible one, when autobeaming is in effect.
A manual beam crashes lily.

So my question is: How can I retrieve the actual/current stem direction?

TIA
Jan-Peter

%%%%% snip %%%%%
\version "2.19.62"

#(define-public (stem-direction-engraver context)
    (make-engraver
     (acknowledgers
      ; store stem direction
      ((stem-interface engraver grob source-engraver)
       ; this function crashes, if a beam starts
       (ly:message "stem info ~A" (ly:stem::calc-direction grob))
       )
      )
     ))

\layout {
   \context {
     \Voice
     \consists #stem-direction-engraver
   }
}

\score {
   % the directions are not completely
   \relative { c''8 b bes a g f e d }
}

\score {
   % the function crashes with the beam-event
   \relative { c''8 b[ bes] a g f e d }
}

%%%%% /snip %%%%%




_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel