On Mon 08 Jan 2024 at 01:45:32 (+0000), Karen Billings wrote:
> I deleted the commented section, saved the file, and got the same behavior. I 
> used the file lilypond-8.22.1.mingw, downloaded on 8/8/21, to install 
> lilypond on this machine. Is that the correct install program?

I don't see that the program version matters. I've not noticed
any changes in this area for years.

> Ultimately, the solution was a combination of Kieren's and Mario's solutions:
> 1. Move "Bar_number_engraver" to layout block:
> 
> 
>     \context {
> 
>       \Score
> 
>       \consists "Bar_number_engraver"
> 
>       barNumberVisibility = #(every-nth-bar-number-visible 1)
> 
>       \override BarNumber.break-visibility = #end-of-line-invisible
> 
>     }
> 
> 
> 2. Replace contents of the \Score block with a BarNumber.break-visibility 
> statement
> 
>     \context {
> 
>       \Score
> 
>       \override BarNumber.break-visibility = ##(#f #t #f)
> 
>     }
> 
>   
> The odd thing is that the original "Bar_number_engraver" command worked fine 
> with a single staff.

So what you've got here is a context (1) to write barnumbers on the
first measure of each line, followed by a context (2) to write
barnumbers on all measures except the first. (It doesn't matter
where you place the barNumberVisibility.)

I would just write the single context:

  \context {
    \Score
    \override BarNumber.break-visibility = #end-of-line-invisible
    barNumberVisibility = #all-bar-numbers-visible
  }

which is what Kieren suggested.

You could even put the following in a separate file, and just drop it
in with \include at the top of the file (like language, paper etc)
whenever you needed it to apply by default to all scores in the file.

  \layout {
    \context {
      \Score
      \override BarNumber.break-visibility = #end-of-line-invisible
      barNumberVisibility = #all-bar-numbers-visible
    }
  }

Cheers,
David.

Reply via email to