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
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to