lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding Bar Line types


From: ctesta
Subject: Adding Bar Line types
Date: Mon, 16 Apr 2012 10:58:30 -0400
User-agent: SquirrelMail/1.4.22

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







reply via email to

[Prev in Thread] Current Thread [Next in Thread]