Hi LilyPond experts,
I'm trying to make a function that will draw a curved line given only a destination point (with some math I'll add later), but I've hit an early stumbling block: I can't seem to substitute variables for values in the path/curveto command list. The following code produces a `wrong-argument-type' error, but it points to scm/stencil.scm which isn't very helpful for figuring out what's wrong. Help appreciated!
\version "2.18.2"
#(define-markup-command (draw-curved-line layout props points)
(number-pair?)
(let ((xpt (car points))
(ypt (cdr points)))
(interpret-markup layout props
(markup #:path 1 '((curveto 0 ypt 0 ypt xpt ypt))))))
\relative {
b_\markup { \draw-curved-line #'(5 . 5) }
}