lilypond-user
[Top][All Lists]
Advanced

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

Re: key-change-event listener in 2.20


From: Aaron Hill
Subject: Re: key-change-event listener in 2.20
Date: Mon, 31 Aug 2020 10:31:57 -0700
User-agent: Roundcube Webmail/1.4.2

On 2020-08-31 8:15 am, Maurits Lamers wrote:
Hi all,

I just noticed that in Lilypond 2.20 the key signature listener in my
braille system doesn't get called anymore, where under 2.18.2 it does.
I added a code sample below where I show how I attach the listeners.
All the other events seem to be called in the normal way. Did anything
change in the mean time?

Something else must be going on, because the following works in 2.18.2 and 2.20.0:

%%%%
\version "2.18.2"

#(define (format-event engraver event)
  (let ((origin (ly:prob-property event 'origin)))
    (ly:input-message origin "found event here")))

\new Voice \with {
  % Using make-engraver macro:
  \consists
  #(lambda (context)
    (make-engraver
      (listeners
        ((key-change-event engraver event)
          (format-event engraver event)))))

  % Manually constructed:
  \consists
  #(list
    (cons 'listeners
      (list
        (cons 'key-change-event format-event))))
} { \key g \major g'2 b' | \key aes \major c''2 aes' }
%%%%


-- Aaron Hill



reply via email to

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