[Top][All Lists]

[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: Thu, 03 Sep 2020 12:07:02 -0700
User-agent: Roundcube Webmail/1.4.2

On 2020-09-03 5:03 am, Maurits Lamers wrote:
Hi all,

I finally figured out what goes wrong here. The issue is that I get
the key signature and the last key signature from the context in the
following way:

(ly:context-property (ly:translator-context engraver) 'keySignature))
(ly:context-property (ly:translator-context engraver) 'lastKeySignature))

which works in 2.14 up to 2.18. In 2.20 these properties seem to have
been renamed to keyAlterations and lastKeyAlterations (according to
What would be the best way to support both 2.18 and 2.20? Is there a
better / more reliable method of getting this information?

You could check to see which symbol exists as a translator property:

(define (translator-property? symbol)
  (memq symbol all-translation-properties))

;; ...

  (ly:translator-context engraver)
  (car (filter translator-property? '(keyAlterations keySignature)))

-- Aaron Hill

reply via email to

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