[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bar numbers on lines beginning with a partial measure
From: |
Aaron Hill |
Subject: |
Bar numbers on lines beginning with a partial measure |
Date: |
Sun, 06 Feb 2022 01:16:09 -0800 |
I have for quite some time just relied on the default behavior where bar
numbers are printed only for the first measure in each line (save the
very first measure). This works reasonably well as my musicians are
able to locate measures by number fairly quickly. However, there is an
issue when I opt to split measures over a line break. (This practice is
quite common in hymnals, though I find it equally effective for modern
music to avoid having pickup/trailing notes/lyrics straddling a line
break.) When the first measure on a line is a partial measure, no bar
number is shown. This means some lines in my lead sheets have no bar
number for reference. In some cases, I end up with no automatic bar
numbers at all.
(Some code for context/reference...)
%%%%
midMeasureBreak = { \bar "" \break }
forceBarNumber =
\once \override Score.BarNumber
.break-visibility = #all-visible
{ R1*4 \break
R1*4 r2 r4 \midMeasureBreak r4
R1*4 r2 r4 \midMeasureBreak r4
\forceBarNumber
R1*4 \bar "|." }
%%%%
As can be see above, I can manually override the bar number visibility,
but it is not very elegant. If I opt to reflow music, I would have to
revisit the bar numbers to make sure only the ones I want are there. It
would be very nice if LilyPond could treat the first full measure as the
effective first measure on the line w.r.t. break visibility settings.
Has anyone else encountered this and come up with a solution? If not, I
will dig around the existing engraver logic and see about submitting a
patch should folks find the updated behavior desirable.
-- Aaron Hill
- Bar numbers on lines beginning with a partial measure,
Aaron Hill <=