On Wed 28 Sep 2011, 15:49 Alberto Simões wrote:
Hello
I am trying to save Timing.measureLength in a little music function,
but I am unable to find examples in the web of how to get that value
(only how to set).
My try (ok, most of the code was suggested by Jan-Peter), is something like:
partialInline = #(define-music-function (parser location nom den
mus)(integer? integer? ly:music?)
#{
#(def tmp (get Timing.measureLength))
$mus
\set Timing.measureLength = tmp
#})
but, how to write the (get ..) portion?
I am sorry, why not to use documented Score.measurePosition?
%------------8<-------------------
partialInline =
#(define-music-function (parser location nom den mus)
(integer? integer? ly:music?)
#{
\set Score.measurePosition = #(ly:make-moment $nom $den)
$mus
#})