lilypond-user
[Top][All Lists]
Advanced

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

Re: Key Signature name in Markup


From: Thomas Morley
Subject: Re: Key Signature name in Markup
Date: Mon, 2 Apr 2018 16:48:37 +0200

Hi,

2018-04-02 6:32 GMT+02:00 brob2684 <address@hidden>:
> Hi Harm,
>
> I hadn't really thought about no key signature as being an issue, but I can
> certainly see how it can cause confusion.
>
> I think you are correct in suggesting "no key signature present" would be
> the appropriate output, although I'll admit I'm unlikely to ever come across
> such a case in my use of lilypond.

Well, even your first musical example has no (initial) KeySignature ;)

>>> melody = \relative c'' {
>>>   \time 4/4
>>>   c1 \key d \major d \key e \major e \key f \major f
>>> }

For the arbitrary reuse of a variable, this variable needs to be
defined at toplevel.
It's possible to update such a toplevel-variable by using an engraver,
though if you clear that variable in the engraver the value(s)/entries
are only available _in_ the score where the engraver works.
For multiple scores in the same file this means: if you don't clear it
then the values will accumulate (or override themselves).
Additionally the engraver updates it too late to have direct access to
the new values for other toplevel-markups.

So I decided to let the key-sig-names accumulate in a toplevel-list,
numbering them. Also, I wrote a markup-command where you need to
select the correct entry by using a number. A markup-command is
processed late enough.

Code attached, note the comments.

HTH,
  Harm

Attachment: atest-75.png
Description: PNG image

Attachment: atest-75.ly
Description: Text Data


reply via email to

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