When typesetting music where line breaks are allowed at half bars the
every-nth-bar-number-visible set to 1 and the break-visibility set to
#begin-of-line-visible gives the bar numbers at the start of each line
with the bar number in parenthesis if the line starts half way through
the bar. This is good, but has the unfortunate consequence that it
prints the bar number 1 at the start of the music.
Can someone suggest how to avoid that? I can see that it would be
possible to augment translations-functions.scm file in the Lily sources
to include something like

(define-public ((every-nth-bar-number-visible-except-first n) barnum
mp)
  (and (> n 0) (= 0 (modulo barnum n)))) 

but I can't figure out how to do this from a LilyPond score.

Here's a MWE that shows the problem

\version "2.24"

\layout {\context {\Score 
    barNumberVisibility = #(every-nth-bar-number-visible 1) 
    \override Score.BarNumber.break-visibility = #begin-of-line-visible }}
 { 
    \repeat unfold 200 {c''d'' \bar "" e'' f'' }
                        } 

Richard Shann



Reply via email to