Our choir has developed some "in-house" markings which I'm trying to
replicate in LilyPond. One is the use of a double slash to visually
indicate the last section of a piece when the musical pattern changes
for that last part.
I can replicate that by using a markup like the following:
a2^\markup { \with-dimensions #'(0 . 0) #'(0 . 0) \path #0.3 #'((moveto
5 -2) (lineto 7 2) (moveto 6 -2) (lineto 8 2)) }
However, when the note I'm using is above the staff, I need to move the
Y-coordinates down, and sometimes there's a need to shift the slashes
closer to or further away from the note. So I'm trying to set up a
markup function to handle this, so I can just annotate the note as:
a2^\markup \double-slash #5 #-2
But I can't seem to get the syntax correct. If I leave the arguments as
dummy args, this works:
#(define-markup-command (double-box layout props xoff yoff) (number?
number?)
(interpret-markup layout props
#{
\markup {
\with-dimensions #'(0 . 0) #'(0 . 0)
\path #0.3 #'((moveto 5 -2) (lineto 7 2) (moveto 6 -2)
(lineto 8 2))
}
#}
))
But when I try to implement the numbers, I get errors no matter what I
do. This (while it doesn't work) shows what I'm trying to get to:
#(define-markup-command (double-box layout props xoff yoff) (number?
number?)
(interpret-markup layout props
#{
\markup {
\with-dimensions #'(0 . 0) #'(0 . 0)
\path #0.3 #'((moveto xoff yoff) (lineto (+ xoff 2) (+ yoff
4)) (moveto (+ xoff 1) yoff) (lineto (+ xoff 3) (+ yoff 4)))
}
#}
))
Any ideas on what I'm doing wrong?
- Mike
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user