Peter Mayes wrote:
I have since learned about silent notes, and I get almost what I want if
I add a silent note after the advisory key change. But then the bar
lengths are altered. To put the two result together:
Ideally what I want is the first version, but with the stave extending
just enough to go through the key signature.
I take it that your silent note moved things around too much.
The shortest thing you can add is a grace note. This will also move
things, but not nearly as much. Try adding just
%%%%%%
\grace s1
%%%%%%
Lilypond accepts this, but leaves a complaint in the log.
You probably have to ignore that complaint for now.
See https://gitlab.com/lilypond/lilypond/-/issues/3851
which refers to grace-end-2.ly
which 64bit versions no longer have.
Cheers,
Robin