lilypond-devel
[Top][All Lists]
Advanced

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

calc stem direction


From: Jan-Peter Voigt
Subject: calc stem direction
Date: Wed, 14 Jun 2017 14:37:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

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 %%%%%






reply via email to

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