On Fri, 3 Feb 2023 at 15:03, Valentin Petzel <
valentin@petzel.at> wrote:
>
> Hi Rip_mus,
>
> Bar Lines are not in fact glyphs, but drawn directly. We could recreate a
> drawing procedure for markups, but the easiest thing to do would probably be
> to use the \score markup command for this as seen in the appended file.
Hello,
Or we could add the "Bar_engraver" to the Dynamics context, with some tweaks as the following example shows.
\score {
<<
\new Staff {
\new Voice = "melody" {
\relative {
a'4 a a a
a a a a
\repeat volta 2 { b4 b b b }
}
}
}
\new Dynamics \with {
\consists "Bar_engraver"
\override BarLine.bar-extent = #'(-2 . 2)
\override BarLine.stencil =
#(lambda (grob)
(if (string=? (ly:grob-property grob 'glyph-name) "|")
(set! (ly:grob-property grob 'glyph-name) ""))
(ly:bar-line::print grob))
} {
s1\mf
s1
\repeat volta 2 { s1\p }
}
>>
}
Cheers,
Xavier
--