That worked for me too.
The reason that I didn't include any files was that I couldn't find any documentation on how to include Scheme files. As I had said - I  had tried many variations, but nothing so simple as just including a file containing the Scheme code.
I had tried #define statements, etc.
Where is the reference document in version 2.26.0?

On 2026-08-27 14:58, Knute Snortum wrote:
\version "2.26.0"
musicOne = {
  \include "barLineColorRed.ily"
  R1
  R1
  % \section barline in red
  \section
  R1
  R1
  % fine barline in red
  \fine
}
\score {
  \musicOne
}
%%%

%%% barLineColorRed.ily %%%
  \override Staff.BarLine.color =
  #(lambda (grob)
     (let ((glyph (ly:grob-property grob 'glyph)))
       (cond ((member glyph '("||" "|.")) red)
             (else #f))))
%%%
Tell us what you've tried and what happened.

Reply via email to