I'd like to put an iteration in a markup command. I've never done that before so I'm a little lost (I've already tried hundreds of alternatives... :( ):
Here's where I am so far:
%%%%%
\version "2.19.18"
#(define-markup-command (staff-lines-it layout props n pad long) (number? number? number?) (interpret-markup layout props (define (iter n) (if (= n 0) (markup (#:path 0.15 `((moveto 0 ,(* pad 0))(lineto ,long ,(* pad 0))))) (iter (- 1 n)) (markup (#:combine (#:path 0.15 `( (moveto 0 ,(* pad n))(lineto ,long ,(* pad n)) ; n
;;iteration: ;(moveto 0 ,(* pad 0))(lineto ,long ,(* pad 0)) ; 0 ;(moveto 0 ,(* pad 1))(lineto ,long ,(* pad 1)) ; 1 ;(moveto 0 ,(* pad 2))(lineto ,long ,(* pad 2)) ; 2 ;... ;(moveto 0 ,(* pad n))(lineto ,long ,(* pad n)) ; n ))) ) ))))
%% Test: should show 5 staff lines with padding #1 and length #10: