Hi Stu,

On Fri, Nov 10, 2023 at 11:18 AM Stu McKenzie <swws...@handsmck.com> wrote:

> Thank you, Michael, for the working example.
>

You're quite welcome.

It seems that additional combinations of defineBarLine were added in
> version 2.25.
> I downloaded version 2.25.9 and found that adding break resulted in
> inconsistent results using the defineBarLine with the
> Score.startRepeatBarType and Score.endRepeatBarType.
>
> For example simply adding a \break before changing the
> Score.startRepeatBarType, i.e.:
>
>       c d e f
>       \break
>       \set Score.startRepeatBarType = #"[[|:"
>
> results in the bar line at the end of the first line to include the new
> start repeat bar type.
>
> I've tried defining various combinatons of bar lines, as defined on the
> documentation for 2.25.9, e.g.:
>   \defineBarLine "[[|:-StartDouble_fff" #'( #f #f #f )
>   \defineBarLine "[[|:-EndDouble_fff" #'( #f #f #f )
>   \defineBarLine "[[|:-StartDouble_ttf" #'( #t #t #f )
>   \defineBarLine "[[|:-EndDouble_ttf" #'( #t #t #f )
>   \defineBarLine "[[|:-StartDouble_ttt" #'( #t #t #t )
>   \defineBarLine "[[|:-EndDouble_ttt" #'( #t #t #t )
> but cannot get the results that I'd like, especially when alternatives are
> added to the repeat volta.
>
> Any further suggestions?
>

Yup. Try these:

  \defineBarLine "[[|:" #'( #f #t #f )
  \defineBarLine ":|]]" #'( #t #f #f )
  \defineBarLine ":|][[|:" #'( ":|]" "[[|:" #f)
  \defineBarLine ":|]][[|:" #'( ":|]]" "[[|:" #f)

As we want the end repeat to show up at the end of a line but not the
beginning, and the start repeat to show at the beginning of a line but not
the end, the eol and bol booleans need changed. Basically the two are the
reverse of each other. So eol true for the end repeat, and bol true for the
begin repeat. I've left the span-bar set false for both - the built-in
single winged repeat appears to have it set to false, so I'm following
along with that here. And yes, I goofed in my first message - I said it was
beginning, mid and end of line. I skimmed the docs a bit too quickly
there.  It is end of line, beginning, and span-bar (as in the bar spanning
between staves when grouped, such as a StaffGroup).

 The next two are for use in \set Score.doubleRepeatBarType  They're the
repeat sign that shows when two repeated sections are back to back. The
first ( ":|][[|:" ) is going from a single winged repeat to a double
winged, while the second is going from double to double. And with those,
both the beginning of line and the end of line behavior are specified as
separate entries. That way if there's a line break with either of them it
should get the correct repeat sign either side of the line break.

So now we have:

\new Staff {
  \defineBarLine "[[|:" #'( #f #t #f )
  \defineBarLine ":|]]" #'( #t #f #f )
  \new Voice {
    \relative c' {
      \set Score.startRepeatBarType = #"[|:"
      \set Score.endRepeatBarType = #":|]"
      c' d e f
      \repeat volta 2 {
        c d e f
      }
      c d e f
      \break
      \set Score.startRepeatBarType = #"[[|:"
      \set Score.endRepeatBarType = #":|]]"
      \repeat volta 2 {
        c d e f
      }
      \fine
    }
  }
}

producing:

[image: image.png]

and:

\new Staff {
  \defineBarLine "[[|:" #'( #f #t #f )
  \defineBarLine ":|]]" #'( #t #f #f )
  \defineBarLine ":|][[|:" #'( ":|]" "[[|:" #f)
  \defineBarLine ":|]][[|:" #'( ":|]]" "[[|:" #f)
  \new Voice {
    \relative c' {
      \set Score.startRepeatBarType = #"[|:"
      \set Score.endRepeatBarType = #":|]"
      \set Score.doubleRepeatBarType = #":|][[|:"
      c' d e f
      \repeat volta 2 {
        c d e f
      }
      \break
      \set Score.startRepeatBarType = #"[[|:"
      \set Score.endRepeatBarType = #":|]]"
      \repeat volta 2 {
        c d e f
      }
      c d e f
      \set Score.startRepeatBarType = #"[|:"
      \set Score.endRepeatBarType = #":|]"
      \repeat volta 2 {
        c d e f
      }
      \set Score.doubleRepeatBarType = #":|][[|:"
      \set Score.endRepeatBarType = #":|]]"
      \repeat volta 2 {
        c d e f
      }
      c d e f
      \fine
    }
  }
}

producing:

[image: image.png]

Hopefully this'll help get you a bit closer to what you're after.
-- 
Michael

Reply via email to