|
From: | David Nalesnik |
Subject: | Re: Accessing context properties (e.g. the current key) from a music function? |
Date: | Fri, 1 May 2015 07:54:50 -0500 |
test =#(define-music-function (parser location music) (ly:music?)(let ((k "ERROR"))#{\applyContext#(lambda (context)(set! k (ly:context-property context 'tonic))(display k))\transpose #(ly:make-pitch 0 0) #k #music
#(display k)#(newline)#}))\score {\new Staff {\key a \major\test { a b cis d e }}}
[Prev in Thread] | Current Thread | [Next in Thread] |