On Tue, Jul 18, 2023 at 6:30 PM Jean Abou Samra <[email protected]> wrote:

> Le mardi 18 juillet 2023 à 18:07 -0400, Trevor Bača a écrit :
>
> Is this intentional? And, if it is, is there a way to re-supply the
> missing bar line?
>
>
>
> Yes, and yes. This is a frequent question, so I've wondered a couple times
> if we should come up with a new command to recommend instead of \bar, but
> it's not clear that the alternatives are better.
>
> https://gitlab.com/lilypond/lilypond/-/issues/6414 is related.
>
> In short, from LilyPond's point of view, the bar line at the end of the
> previous system is the same bar line as the one at the start of the new
> system. Which is not illogical, considering that they would be the same if
> there were no line break.
>
> Consequently, the \bar command defines *both* bar lines. And if you look
> at the list of bar lines at
> https://lilypond.org/doc/v2.24/Documentation/notation/list-of-bar-lines ,
> you can see that \bar ".|:" has no drawing at end of line. \bar ".|:-|"
> does.
>

Ah! I had no idea the inventory of bar line commands had come so far;
thanks for the pointer to A.18.

The point about LilyPond considering matching end-of-system /
beginning-of-system as, in some ways, the same is interesting to note. What
was behind my question was the want to tweak such end-of-system /
beginning-of-system pairs independently. Happily, this appears to work
perfectly:

%%% BEGIN %%%

% red bar line left of line break; blue bar line right of line break:
{
  c'1
  \bar ".|:-|"
  \break
  \once \override Score.BarLine.color =
    #(lambda (grob) (if (= LEFT (ly:item-break-dir grob)) red blue))
  c'1
}

%%% END %%%

Thanks so much again, Jean.

Trevor.

-- 
Trevor Bača
www.trevorbaca.com
soundcloud.com/trevorbaca

Reply via email to