2008/12/13 Tim Sawyer <list.lilyp...@calidris.co.uk>:

> Unfortunately, this just shows a single bar percent style repeat after four
> bars of music.

Ah, I had a feeling it wouldn't be what you're after. :)

> I need something like the two bar repeat, where all the bar lines are present
> and there's a double line in the middle of the percent.

So two sets of double percent repeats?

The only way I can think of doing this is to override the barline
stencil and use skips for the repeated bars:

doubleRepeatBar = {
  \once \override Staff.BarLine #'stencil =
    #(lambda (grob)
       ;ensure repeat slash isn't too thick
       (ly:grob-set-property! grob 'thickness 0.48)
        ;combine a barline with a double percent repeat
        (ly:stencil-add
          (ly:bar-line::print grob)
          (ly:percent-repeat-item-interface::double-percent grob)))
}

\drummode {
  sn4 sn4 sn4 sn4
  sn8 sn8 sn8 sn8 sn4 sn4
  sn4 sn8 sn8 sn4 sn8 sn8
  sn8 sn8 r8 sn8 sn4 sn4
  \repeat unfold 2 {
    s1
    \doubleRepeatBar
    s1
  }
  \bar "|."
}

Regards,
Neil

<<attachment: double-repeat-bar.png>>

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to