[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Special bar lines
From: |
Thomas Morley |
Subject: |
Re: Special bar lines |
Date: |
Fri, 30 Dec 2016 19:03:08 +0100 |
2016-12-30 17:52 GMT+01:00 Br. Samuel Springuel <address@hidden>:
> Whoops. Spoke to soon. I have some scores where I have these special bar
> lines and either "|." or ":|." and when made in a universal manner, these
> overrides affect them as well (in both the thick line is thinned, in ":|."
> the dots are also reduced in size).
>
> Is there a way to change these settings so that they only affect the "[" and
> "]" bar lines and not anything else?
>
> I've thought about using \temporary ... \revert and \once to affect just the
> barlines I want, but these create more edits (which to some extent can be
> automated via sed). I'm hoping for a solution which will be easy to apply
> on a project wide basis by adding it to the project style file (which all
> project files include).
You could do:
\defineBarLine "[" #'("" "[" "")
\defineBarLine "]" #'("]" "" "")
{
\override Staff.BarLine.before-line-breaking =
#(lambda (grob)
(let ((glyph-name (ly:grob-property grob 'glyph-name)))
(if (member glyph-name '("[" "]"))
(begin
(ly:grob-set-property! grob 'thick-thickness 1)
(ly:grob-set-property! grob 'font-size -4)))))
c' \bar "[" c' c' \bar "]" c'
\repeat volta 2 c'1
c'
\bar "|."
}
Please shout, if further problems occuring.
There's still the possibility left to define a new bar-line from scratch.
Cheers,
Harm