lilypond-user
[Top][All Lists]
Advanced

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

Re: how to get half-bar used in Bach Music?


From: Alexander Kobel
Subject: Re: how to get half-bar used in Bach Music?
Date: Sun, 21 Nov 2010 14:40:38 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6

On 2010-11-21 13:55, Marc Mouries wrote:

thanks Ted, that could do it. The tricky part though is that Bach uses a
half-bar every other measure.

I ttried this but got 2 issues:
1) 5.0 is not the normal height of the bar line. Would you know what it is?
2) i put a second override to get a normal bar after a half-bar size but
the second override seems to override the 1st override ???

\relative c' {
\override Staff.BarLine #'bar-size = #2.0
c4 c c c |
\override Staff.BarLine #'bar-size = #5.0
c c c c |
}

Hi, Marc,

halfBar = \once \override Staff . BarLine #'bar-size = #2

relative c' {
  c4 c c c \halfBar |
  c c c c |
}

should give you what you want. The \once says that this tweak should be applied - well, just once. Thus, there's no need to rewrite the whole thing just to get "normal size" bars; if you do not want to use the \once however, be sure to check out the \revert command.

An \override without \once affects all objects on the very time you call it, and lasts for the later ones. Thus, your code works as expected, but regardless of the order of | and \override, the /second/ call holds for the moment the BarLine gets drawn. The first affects everything from time 0 to just before the end of the first measure, but there is no bar line there.


HTH,
Alexander



reply via email to

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