On Sun, 2024-06-09 at 10:33 +0200, Valentin Petzel wrote:
> Hello Richard,
> 
> usually for this I’d simply use grace notes to create a timestep
> separation 
> between two clefs:
> 
> {
>   \clef bass
>   \once\hideNotes\grace c64
>   \once\override Staff.Clef.X-extent = #'(1.5 . 2)
>   \clef treble
>   1
> }

I cooked up something along those lines, but thought it too hacky ...

> 
> But then it would actually be quite easy to have this done properly
> by an 
> engraver (without any hacks). See the appended file for such an
> engraver that 
> will enable showing an initial clef change.
> 
> Also the change clef will use the cue-clef break alignment, so using
> that you 
> can actually adjust order (such as placing the change clef before key
> or time 
> sigs) simply by using the break-align-order.
> 
> It would in fact be quite simple to extend the clef engraver to do
> this 
> natively, simply by setting some context property. Maybe then using
> an 
> initial-change-clef break alignment and a slightly adapted glyph name
> calculation that takes this into account (currently the small clef
> glyph needs 
> to be set in the engraver, as Lilypond does not use change clefs at
> the begin 
> of the line).

I was imagining that this construct was more commonly used than I guess
it actually is (the current case that I have been asked about is not
even what I took to be the common case of pianists so used to having
treble and bass that they don't notice it's two bass clefs), so Knute's
relatively simple suggestion will be fine.
Omce again, a lot of useful insights in the code you provided - thank
you.

Best,
Richard

Reply via email to