Adjacent double bars

2015-03-21 Thread John McWilliam
Bagpipe music has it's own conventions where each section or part of a tune
is enclosed in either repeat bars or what I call double bars (\bar ".|" and
\bar "|."). The end of a part usually coincides with a line break. I have a
problem with this and find that adjacent barlines with a break in between
get overridden and one of the bar lines is eliminated. I have tried using
\bar "||" instead but this does not help. See below:
---
\version "2.18.0"

music = \relative c' {
\key c \major
\time 4/4
\bar ".|:"

%Part 1
\repeat volta 2 {
\partial 8 a8
a4. a8 b4. b8
c4. c8 d4. 
\break }

%Part 2
\bar ".|"   % this blocks the repeat sign at the end of part 1
e8 |e4. e8 f4. f8
g4. g8 a4. 
a8 b4. b8 c4. \bar "|."
\break

%Part 3
\bar ".|"   % this blocks the double bar at the end of part 2
a8 |
a4. a8 b4. b8
c4. c8 d4. \bar "|."
\break 

}% end relative

\score {
   \new Staff \music
}




-----
John McWilliam
--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Adjacent-double-bars-tp173426.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Adjacent double bars

2015-03-21 Thread Nathan Ho
On Sat, Mar 21, 2015 at 8:38 AM, John McWilliam  wrote:
> Bagpipe music has it's own conventions where each section or part of a tune
> is enclosed in either repeat bars or what I call double bars (\bar ".|" and
> \bar "|."). The end of a part usually coincides with a line break. I have a
> problem with this and find that adjacent barlines with a break in between
> get overridden and one of the bar lines is eliminated. I have tried using
> \bar "||" instead but this does not help. See below:

What you need is \defineBarLine:
http://www.lilypond.org/doc/v2.18/Documentation/notation/bars

\version "2.18.0"

\defineBarLine ":|.-.|" #'(":|." ".|" ":|.")
\defineBarLine "|.-.|" #'("|." ".|" ".|.")

music = \relative c' {
\key c \major
\time 4/4
\bar ".|:"

%Part 1
\repeat volta 2 {
\partial 8 a8
a4. a8 b4. b8
c4. c8 d4.
\break }

%Part 2
\bar ":|.-.|"
e8 |e4. e8 f4. f8
g4. g8 a4.
a8 b4. b8 c4.
\break

%Part 3
\bar "|.-.|"
a8 |
a4. a8 b4. b8
c4. c8 d4. \bar "|."
\break

}% end relative

\score {
   \new Staff \music
}

Regards,
Nathan

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user