lilypond-devel
[Top][All Lists]
Advanced

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

(scheme-)engraver in 2.20/21


From: Jan-Peter Voigt
Subject: (scheme-)engraver in 2.20/21
Date: Thu, 24 Sep 2020 11:51:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hi all,

after some other very involving projects I can now refocus on lilypond :-)

I probably missed a change in 2.20/21. If I create a scheme-engraver the
"start-translation-timestep" slot is not called, if the "initialize"
slot has been called in this particular timestep. If this the intended
behaviour I appreciate it because it is consistent. The "start-trans.."
slot wasn't called before for instant voices, but for regular installed
contexts. So now I have to finish "initialize" of the engraver with
"start-trans..." in any case.

So my question is if this is intended and not likely to change?
Sorry, if I missed discussion about this!

I have a demo below, where you can see that "start-trans..." is not
called, if "initialize" has been called before in the same timestep.


Jan-Peter

----------------------------------------
\version "2.21.5"

#(define (show trans slot)
   (let ((port (current-error-port)))
     (display slot port)(display "\t" port)
     (display (ly:context-current-moment (ly:translator-context trans))
port)
     (newline port)))

eng =
#(make-engraver
  ((initialize trans)
   (show trans "* initialize"))
  ((start-translation-timestep trans)
   (show trans "> start-translation-"))
  ((process-music trans)
   (show trans "  process-music"))
  ((stop-translation-timestep trans)
   (show trans "< stop-translation-"))
  ((finalize trans)
   (show trans "! finalize   ")) )

\layout {
  \context {
    \Voice
    \consists #eng
  }
}

\relative { c''8 b bes a << { as g fis g } \\ { es e dis e } >> }
----------------------------------------






reply via email to

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