I'm using define-markup-command to simplify the indication of barring for a single chord, but what I have at the moment defaults to being centred on the note, and the vertical line indicating how many strings to cover is overlaid by the notehead unless the markup position is tweaked. Is it possible, if I have an additional numeric argument for the amount of shift needed, to apply that shift from inside the define-markup-command rather than having to use an external tweak? This is what I have at the moment:

\version "2.15.32"

#(define-markup-command (mbarre layout props fretnum vdrop) (markup? number?)
    (interpret-markup layout props
#{ \markup \small \bold { \concat { \postscript #(string-append "0.1 setlinewidth 0.7 -0.5 moveto 0 -" (number->string vdrop) " rlineto 0.5 0 rlineto stroke") $fretnum } } #}
    )
)

\relative c'' {
<e c>4^\markup { \mbarre "CV" #2.3 } <e c>-\tweak #'extra-offset #'(-1.5 . 0)^\markup { \mbarre "CV" #2.3 }
}

Nick

<<attachment: test.png>>

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to