lilypond-user
[Top][All Lists]
Advanced

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

Re: Special bar lines


From: Br. Samuel Springuel
Subject: Re: Special bar lines
Date: Fri, 30 Dec 2016 11:52:47 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

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).

My experimentation:
%%%%%%%%%%%%
\version "2.19.53"

% extra bar lines (optional bars)
\defineBarLine "[" #'("" "[" "")
\defineBarLine "]" #'("]" "" "")

optBarOpen = { \once \override Staff.BarLine.thick-thickness = 2 \once \override Staff.BarLine.font-size = #-4 \bar "[" } optBarClose = { \once \override Staff.BarLine.thick-thickness = 2 \once \override Staff.BarLine.font-size = #-4 \bar "]" }


music = {
% in order to apply the overrides to just the barlines I'm interested in
    % I need to make them temporary and revert them
c' \temporary \override Staff.BarLine.thick-thickness = 2 \temporary \override Staff.BarLine.font-size = #-4 \bar "[" c' c' \bar "]" c' \revert Staff.BarLine.thick-thickness \revert Staff.BarLine.font-size c' \bar "|" c' c' \bar ":|." c'
    % I can also use \once, which has the advantage of being easier to
    % separate out into a function
    c' \optBarOpen c' c' c' \optBarClose c' c' c' \bar "|."
}

\layout {
    \context {
        \Staff
        % these universal overrides also affect the ":\." bar and thus
        % are no good, but they are the easiest to apply project wide
        % because they require that only the project style file be editted
        %\override  BarLine.thick-thickness = 2
        %\override  BarLine.font-size = #-4
    }
}

\new Staff
{
    \new Voice = "mel" { \music }
}
--
✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ



reply via email to

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