lilypond-user
[Top][All Lists]
Advanced

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

Re: Peculiar behavior of barlines


From: Kevin Barry
Subject: Re: Peculiar behavior of barlines
Date: Sat, 21 Mar 2020 11:51:06 +0000

On Fri, Mar 20, 2020 at 06:55:44AM -0700, Sami Amiris wrote:
> Thank you for the suggestion. I tried it, so far I haven't got results.

I was able to get what you want (I think) from your minimal example from
an earlier email. The code is below (reformatted - your indentation/code
style is really hard to read). I hope this helps. Note that I modified
the barline in the lower staff not the upper one (where your comments
suggest you think the problem is).

\version "2.18.2"

\header {tagline = ""}

\layout {
  indent = 0\cm
  \context {
    \Score
    \remove "Timing_translator"
    \remove "Default_bar_line_engraver"
  }
  \context {
    \Staff
    \consists "Timing_translator"
    \consists "Default_bar_line_engraver"
  }
}

% barlines for bottom staff - double line
%
\defineBarLine "||-end" #'("||" #f " !")
\defineBarLine "||-beg"  #'("||" #f "!")
\defineBarLine "||-!"  #'("||-end" "||-beg" "!")

% PROBLEM - barlines for top staff - single thick
%
\defineBarLine ".-end" #'("." "." " !") % here
\defineBarLine ".-beg" #'("." "." "!")
\defineBarLine ".-!" #'(".-end" ".-beg" "!")

\new StaffGroup
{
  << 
    % Top staff
    \new Staff 
    {
      \time 4/4
      \bar".-!" 
      c'1 \bar".-!" % <<< here
    }
    % bottom, double-line
    \new Staff 
    {
      \time 4/4
      \bar"||-!" 
      c'1 \once \override Staff.BarLine.X-offset = #0.5 \bar"||-!" 
    }   
  >>
}



reply via email to

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