lilypond-user
[Top][All Lists]
Advanced

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

Re: enharmonic transposition of key signatures?


From: David Kastrup
Subject: Re: enharmonic transposition of key signatures?
Date: Tue, 24 Jan 2012 11:28:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Shevek <address@hidden> writes:

> I have a situation like the following, and I would like to have the second
> key display as D flat, rather than as C sharp. I can't figure out a way to
> do this without duplicating the global variable (but that would defeat the
> purpose of the global variable, wouldn't it?). Has anyone else come up with
> a solution to this situation?
>
> Sorry for posting so many questions the past day or so.
>
> \version "2.14.2"
> \language "english"
>
> global = {
>   \key c \major
>   s1*2
>   \key b \major
>   s1*2
> }

global = #(define-music-function (parser location key2) (ly:music?)
  #{ \key c \major s1*2 $key2 s1*2 #})

> \score {
>   \new Staff { \transposition bf \transpose bf c' << \global \music >>
>   }

... \global \key b \major ...

> \score {
>   \new Staff << \global \music >>

... \global \key ces \major ...

You can also work with \pushToTag to get your information in there.
Except that it might not be available in 2.14.2 yet.

-- 
David Kastrup




reply via email to

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