lilypond-user
[Top][All Lists]
Advanced

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

Re: Bar lines


From: Thomas Morley
Subject: Re: Bar lines
Date: Wed, 6 Mar 2013 02:59:54 +0100

2013/3/5 Noeck <address@hidden>:
> Hi,
>
> I tried the (relatively) new bar line interface:
> \version "2.17.12"
> \defineBarLine "|:" #'(":||" "" "|:")   % a)
> \defineBarLine ":||" #'(":.." "" " ||") % b)
>
> \new StaffGroup <<
>   \new Staff { a1 \bar "|:" a \bar "|:" }
>   \new Staff { f'1 f' }
>>>
>
> I have four questions:
>
> 1) When using definition in line a), LilyPond complains about a missing
> span bar line style. Should I add line b) to define it?
>
> 2) Is the space in " ||" right in line  b) to align the span bar lines
> properly?

Hi Joram,

I'll try to answer your first two questions while demonstrating a step
by step example.

Let's suppose we want to use a quite funny barline:
\bar ":|..SSS..|:"

The first step is to define it basically and use it.
For testing I used:

oneStaff =
\new Staff { a1 \bar ":|..SSS..|:" a \bar ":|..SSS..|:" \break a }

twoStaffs =
\new StaffGroup <<
  \oneStaff
  \oneStaff
  >>

1)
The basic definition:

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

\oneStaff
\twoStaffs

Very basic, printing the new barline only if it occurs in the middle
of a line (No entry for end, begin and span).

2)
Of course we want this barline at the end of the line, too. Resulting
in an altered definition:

\defineBarLine ":|..SSS..|:" #'(":|..S" "" "")

But now LilyPond complains.
Note that you can only used defined barline-types!

Ok, let us define ":|..S"
\defineBarLine ":|..S" #'(":|..S" "" "")

Now it works:
\defineBarLine ":|..SSS..|:" #'(":|..S" "" "")
\defineBarLine ":|..S" #'(":|..S" "" "")

\oneStaff
\twoStaffs

3)
Nice, though, we want a barline at the begin of a line, too.
Again we have to change the original definitions:

\defineBarLine ":|..SSS..|:" #'(":|..S" "S..|:" "")
\defineBarLine ":|..S" #'(":|..S" "" "")

And again LilyPond complains.
We have to add a definition for "S..|:"
Let us define it similiar to step 2)
\defineBarLine "S..|:" #'("" "S..|:" "")

Now it works:

\defineBarLine ":|..SSS..|:" #'(":|..S" "S..|:" "")
\defineBarLine ":|..S" #'(":|..S" "" "")
\defineBarLine "S..|:" #'("" "S..|:" "")

\oneStaff
\twoStaffs

4)
Ok, but the SpanBars are missing:

Alter the definitions from step 3) as shown here (my design choice):

\defineBarLine ":|..SSS..|:" #'(":|..S" "S..|:" " |.. = ..|")
\defineBarLine ":|..S" #'(":|..S" "" " |..")
\defineBarLine "S..|:" #'("" "S..|:" " ..|")

\oneStaff
\twoStaffs

Now, we're ready.

Note:
a) I used spaces to skip single barline-characters resulting in
"no-span-bar-here".
b) The definitions for ":|..S" and "S..|:" are quite basic. If you
want to use them elsewhere, you have to define them more thoroughly,
setting an explicit behaviour for end, begin and span.
This may result in some more barline-definitions.

>
> 3) Having a ":" in a span bar line style (like in a)), it is printed
> above the staff instead of in between the staves (where I would have
> expected it). Am I wrong to define it this way? Or is this a bug?

The ":" is a colon-barline. It's only use is in repeat-barlines.
It's use as a spanbar makes no sense and is not properly defined.
If you want a dotted line use ";"

>
> 4) Would it make sens to have a fourth bar line situation (besides in a
> line, end of line, start of line): The final bar line at the very end of
> a staff?

Well, I don't think this is a duty of the barline-interface.
Though, it might be thinkable to define an `endStaffBarType´ according to

  defaultBarType = #"|"
  doubleRepeatType = #":..:"
  startRepeatType = #".|:"
  endRepeatType = #":|."

from /ly/engraver-init.ly and let it apply at the end of any Staff.
But I doubt there is really need for that.


HTH,
  Harm



reply via email to

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