|
From: | Leah Velleman |
Subject: | Re: Accessing context properties (e.g. the current key) from a music function? |
Date: | Thu, 30 Apr 2015 20:36:18 -0400 |
k = "ERROR"
test = #(define-music-function (parser location music) (ly:music?)
#{
\applyContext
#(lambda (context)
(set! k (ly:context-property context 'tonic))
(display k)
)
\transpose #(ly:make-pitch 0 0) #k #music
#}
)
\score {
\new Staff {
\key a \major
\test { Fa So La fa so }
}
}
[Prev in Thread] | Current Thread | [Next in Thread] |