Hi everyone, I'm trying to produce a clean and aligned layout in LilyPond where each line contains exactly two measures, and the measure widths on each line are exactly equal. Additionally, I want the final (fifth) bar — which is a short bar containing 16 sixteenth notes — to have the same width as the **first bar** in previous lines.
Here is a minimal example to illustrate my goal. Each measure doubles the
number of notes:
- Bar 1: 1 whole note
- Bar 2: 2 half notes
- Bar 3: 4 quarter notes
- Bar 4: 8 eighth notes
- Bar 5: 16 sixteenth notes
I would like to:
1. Ensure every line has **two measures**.
2. Each measure on the same line has **equal width** (regardless of
content).
3. The **fifth bar** (last line, only one measure) should **match the width
of a single measure from the previous lines**, not stretch across the page.
Here is my minimal example:
```lilypond
\version "2.24.2"
\paper {
indent = 0
}
\layout {
\context {
\Score
\override SpacingSpanner.uniform-stretching = ##t
}
}
\score {
\new Staff {
\time 4/4
\relative c' {
c1 | % Bar 1
c2 c2 | \break % Bar 2
c4 c4 c4 c4 | % Bar 3
c8 c8 c8 c8 c8 c8 c8 c8 | \break % Bar 4
c16 c16 c16 c16 c16 c16 c16 c16
c16 c16 c16 c16 c16 c16 c16 c16 | % Bar 5
}
}
}
```
[image: image.png]
With this code, bar 5 expands to fill the entire last line. But I want it
to only occupy the same horizontal space as bar 1, keeping the layout
visually consistent.
Does anyone know a way to:
• Lock bar widths on each line to be equal?
• And manually set the final bar’s width to match?
Any suggestions would be greatly appreciated!
Thanks,
Peter
test_equalMeasureWidth.ly
Description: Binary data
