I would like to create a Lilypond music function that allows me to express this MWE:
{ \override Score.SpacingSpanner.base-shortest-duration = #(ly:make-moment 1/30) a b c }
as
\spn #1 #30 { a b c }
I tried with with this:
\version "2.22.1"
spn =
#(define-music-function
(beg end notes)
(number? number? ly:music?)
#{
{ \override Score.SpacingSpanner.base-shortest-duration = #(ly:make-moment #(cons beg end)) #notes }
#})
\spn #1 #30 { a b c }
\relative c''
{ \override Score.SpacingSpanner.base-shortest-duration = #(ly:make-moment 1/30) a b c }
which does not produces same output as the MWE.
I get programming error: Unknown type predicate.
I suspect I am expressing the ly:make-moment
argument improperly.
What am I doing wrong?