Hello Everyone,

I would like to add a custom grob to my list of available bar lines. I am
currently doing the following to create custom bar lines.

%Define the new stencil
repeatLeftStencil =
  #(ly:make-stencil
    `(path 0.5
          `(rmoveto 0 -2
            rlineto 0 4
            rlineto 1 2
            rmoveto -1 -6
            rlineto 1 -2
            ))
     (cons -0.5 2)
     (cons -4 4))

%assign the stencil to a variable
repeatLeft = { \once \override Staff.BarLine #'stencil = \repeatLeftStencil }

So then when I want to use the custom grob I just insert \repeatLeft
before the \bar "|" and it overrides the default barline.

What I would prefer to do would be to define the shorthand \bar "|\" (or
something like that) to call my custom grob instead of having to override
it each time I want to use it.

Could anyone direct me to documentation on how I would go about adding my
custom grob to the list of available barline types?

Thanks so much,
Carl





_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to