David, Kieren, and Mario,
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?
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.
Thanks to all for your help with this!
Karen
    On Sunday, January 7, 2024 at 05:30:08 PM MST, David Wright 
<lily...@lionunicorn.co.uk> wrote:  
 
 On Sun 07 Jan 2024 at 23:55:09 (+0000), Karen Billings wrote:
>  Thank you so much for the info, Kieren.
> I followed your instructions and moved the bar numbering block
>     \context {      \Score      \consists "Bar_number_engraver"      
> barNumberVisibility = #(every-nth-bar-number-visible 1)      \override 
> BarNumber.break-visibility = #end-of-line-invisible    }
> from the beginning of the score to the layout block, as in your example.
> Unfortunately, I now get two bar numbers on every measure (not just the first 
> one in each line)! (Is it already Monday?)
> 
> 
> Revised snipped attached.

I compiled the attachment you posted (Morning Wings (snippet2).ly)
and got an eight measure score with each measure numbered (once).
Perhaps you hadn't commented out the first half-dozen lines under
\score when you compiled it, viz:

  % Move measure numbering to layout section
  % \context PianoStaff \with {
  %    \consists "Bar_number_engraver"
  %    barNumberVisibility = #(every-nth-bar-number-visible 1)
  %    \override BarNumber.break-visibility = #end-of-line-invisible
  %  }

Cheers,
David.
  

Reply via email to