lilypond-user
[Top][All Lists]
Advanced

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

Re: Accessing context properties (e.g. the current key) from a music fun


From: David Nalesnik
Subject: Re: Accessing context properties (e.g. the current key) from a music function?
Date: Thu, 30 Apr 2015 18:45:01 -0500

Leah,

On Thu, Apr 30, 2015 at 6:34 PM, Leah Velleman <address@hidden> wrote:
Ah! I hadn't even gotten as far as thinking about key-change events *within* the scope of the music function, though you're right that those would be an issue too (and your suggestion looks like a sensible way of dealing with them). 

What I was trying to get at was the key that was current before the music function was called. That is, the test case I was thinking about would look like this:

\new Staff {
  \new Voice {
    \key re \major   
    \test {
      do'4 mi' sol' do'' <do' mi' sol'>1
    }
  }
}


Unfortunately, that won't be possible.  The function won't see the key change that happened before it was called, and will assume C major.

To do something like you want, you really would need access to context properties....

David 


reply via email to

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