Hi,
i have a function that takes a moment as the argument:
foo =
#(define-music-function (parser location mom)
(ly:moment?)
#{
\override Score.SpacingSpanner.base-shortest-duration = #mom
#})
\new Staff {
\foo #(ly:make-moment 1 50)
c'4 d' e' f'
}
Now, i would like to be able to supply a decimal number and have it
converted to a rational number (i.e. a fraction, which can be easily
converted to a moment), so that i could call the function like this
\foo #0.02 % 1/50 = 0.02
Is there any smart way to do this (a built-in function? I've searched
for one but haven't found any), or do i have to write a
decimal->rational converter? Would anyone want to help with this?
best,
Janek
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user