[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Redefining barline command
From: |
Xavier Scheuer |
Subject: |
Re: Redefining barline command |
Date: |
Sat, 6 Nov 2010 18:36:37 +0100 |
On 6 November 2010 18:24, Nils Gey <address@hidden> wrote:
>
> Hello Lilyponds,
>
> I want to redefine (advanced version: only for the current movement) that
> everytime I use \bar "|." instead, internaly, this should be used:
>
> \once \override Score.BarLine #'transparent = ##f \bar "|."
>
> How can I do this?
>
>
> Background: I deactivated barlines to get a mensural output.
> This deactivates the final, closing, barline, too. |.
> The transparent == ##t override can be placed in the movements layout
> block which is fine because its valid only for one movement.
Hi!
Since you make the bar lines transparent for the whole Score context,
I assume you are not using the "Mensurstriche layout" (bar lines that
are drawn between the staves of a system but not through the staves
themselves), like in this picture:
http://lilypond.org/doc/v2.13/Documentation/notation/working-with-ancient-music_002d_002dscenarios-and-solutions#mensurstriche-layout
Then a simple solution would be to replace your
\override Score.BarLine #'transparent = ##t
(or the equivalent in your \layout block) by
\set Score.defaultBarType = #"empty"
Of course you can place it in the "movement layout" too
\layout {
\context {
\Score
defaultBarType = #"empty"
}
}
Then the
\override Score.BarLine #'transparent = ##t
is no more necessary. :)
> But how do I get the final barline back without placing the directive
> inside of a staff? A staff can be deleted and the instruction would
> be lost.
If the solution above is not satisfying.
You can use an invisible voice (i.e. containing only invisible rests
or \skip ) for such instructions.
Many people use a variable they call "global" for that.
global = {
\key d \minor
\time 4/4
\override Score.BarLine #'transparent = ##t
s1*2
\revert Score.BarLine #'transparent
\bar "|."
}
music = \relative d' {
d1 d1
}
\score {
\new Staff <<
\global
\music
>>
}
Then you can include this \global in every needed Staff .
Cheers,
Xavier
--
Xavier Scheuer <address@hidden>