Hi Robin,

thank you very much for your input!

On Tue, Jan 6, 2026 at 12:42 AM Robin Bannister <[email protected]> wrote:

> Heiko Schill wrote:
> >>
> >> Is there a way to get the desired output somehow?
> >>
>
> Your code starts by defining the music for each voice.
> Fair enough.


Actually, this is mostly the code of Eirik or yourself borrowed from the
recent thread you cited below :) I found that thread after preparing my own
MWE which looked mostly similar but was not as minimalistic as this one...


> But these definitions seem to expect that Cello will be second and Voice
> will be third, the situation set up in the first score.
>

Yes, this is the order of appearance. In the first example, though, the
order of the staves is not what I would like to see.

The second score defines a different order for the staves, but uses the
> voice definitions unchanged, invalidating their expectations.
> The third score has the same muddle, labeling the d1 sequence 'Voice'.


Sure, this is because I wanted to keep the example minimal. I set up the
labels correctly in the "real" score. Your tip using  \markuplist { "1" "2"
"3" "4" "5" "6" "7" "8" } from
https://lists.gnu.org/archive/html/lilypond-user/2025-12/msg00126.html is
really helpful in more complex situations.

My actual problem is something completely different - sorry for not having
explained that well enough before: In the second example, the engraving is
bad when the first "new" voice, the cello, starts in m.11 (see attached
picture).

The clefs is m. 11 are shifted correctly to the right and the notes follow
suit, but the staves themselves start on the far left where any
non-indented staff would start. Additionally, no label (not even in the
wrong position) is produced. This seems to happen, when the order of
appearance does not match the order of the staves. In the first example,
the first voice to start (piano) is engraved as the first staff, the cello
as the second instrument to appear is on the second staff and so on. This
works as expected.

If I only change the order of staves to the desired layout (1st staff:
voice, appears last, 2nd staff: cello, appears second, 3rd staff: piano,
plays from m.1 through to the end), I obtain the output for the second
example. The third one is identical to the second, but just omits the
\RemoveAllEmptyStave. This also works as expected (correct indentation of
the staffs, all labels engraved as intended, although in this example mixed
up because the \markuplist is not adjusted), but produces a massive amount
of full measure rests: The whole piece consists of 100 measures, the cello
plays throughout m.17-72 and the vocals only start in m.73 through to the
end.

You can actually easily create an example with four (or maybe even more,
haven't really tried) staves per system in the same fashion and you will
see the same situation as in m.11 for all but the last occurrence of
\pseudoIndent in the lilypond code.

So the question actually is: Why does \RemoveAllEmptyStave screw up the
indentation of the staves in example 2, but not in example 1? Is there a
way to get the cello label in front of m.11 in this example and the staves
starting in the same horizontal position as the ones in m.21 even if the
order of the staves is like those in the second example?

Best regards,
Heiko

Reply via email to