On 2025-07-18 00:20, Thomas Morley wrote:
Am Fr., 18. Juli 2025 um 06:39 Uhr schrieb Stu McKenzie via LilyPond
User List<swwlilyu...@stoozsoftware.com>:
On 2025-07-17 07:50, Magnus Svenson wrote:
Music = {
b'1
\break % to show colored bar line
\ColorRepeatBegSpecialBar
\repeat volta 2 {
c''1 |
\alternative {
\volta 1 {
d''1 |
\ColorRepeatEndSpecialBar
}
\volta 2 {
e''1 |
}
}
}
}
Thank you Magnus, for your reply. Your new structure certainly clears all of
the warnings.
I removed the "\break" before the color change and it proved your theory that
"lilypond considers them to be the same barline" is correct.
I read somewhere that any repeat should start on a new line if possible, so I would like
to ask others if this feature could be changed by specifying that a bar line before a
"\break" can somehow be left in the default color.
For anyone interested, the full MWE is now:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.24.0"
ColorRepeatBegSpecialBar = {
\once \override Score.BarLine.color = #(x11-color 'orange)
\once \set Score.startRepeatBarType = #"[|:"
}
ColorRepeatEndSpecialBar = {
\once \override Score.BarLine.color = #(x11-color 'orange)
\once \set Score.endRepeatBarType = #":|]"
}
Music = {
b'1
\break % to show colored bar line
\ColorRepeatBegSpecialBar
\repeat volta 2 {
c''1 |
\alternative {
\volta 1 {
d''1 |
\ColorRepeatEndSpecialBar
} % END volta 1
\volta 2 {
e''1 |
} % END volta 2
} % END alternative
} % END repeat volta 2
} % END Music
\score {
\new Staff { \Music }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Have a look athttps://lsr.di.unimi.it/LSR/Item?id=775
Does it help?
Cheers,
Harm
Thanks for the feedback, Thomas.
I've been trying to use some of the Scheme code from that LSR, but
haven't found a solution yet.
I'll keep trying and let others know if I come up with a solution.