On 27/01/2023 22:35, Ole V. Villumsen wrote: > Hi, I am typesetting a movement with a repeat and a clef change right after > the repeat. I have a suitable line break where the repeat ends and the clef > change happens. Default Lilypond sets the new clef within the repeat, before > the end-repeat sign, which I don’t want and find meaningless in my case since > there is no clef change when repeating from the beginning, only when > continuing after the repeated section. Instead I want the clef after the > end-repeat and before the line break. I can do that by setting the clef > change off from the repeated section by a small space. Only the space comes > out much larger than expected. > > Tiny example: > > \version "2.24.0" > > \relative c' { > \repeat volta 2 { > g'4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 8 8 | > } > s1024 > \clef bass > \break > \set Timing.measurePosition = #(ly:make-moment 0/4) > c,,4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | > } > > I enclose the output as png. My 1024th spacer rest is broader than the two > preceding quavers (8th notes) combined. > > * Curious question: why is that?
Not sure, but my guess is that LilyPond might be trying to make different measures have not-too-distant lengths. This is just a guess; I didn't try to investigate, because: > * Constructive question: how to avoid it? Don't use a spacer rest in the first place. See below. > * Real question: How do I set the clef nicely immediately> after the > end-repeat with minimal space between? Use \version "2.24.0" \relative c' { \repeat volta 2 { g'4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 8 8 | } \once \override Score.BreakAlignment.break-align-orders = ##((left-edge staff-ellipsis cue-end-clef ambitus breathing-sign signum-repetitionis cue-clef staff-bar clef key-cancellation key-signature time-signature custos) (left-edge staff-ellipsis cue-end-clef ambitus breathing-sign signum-repetitionis clef cue-clef staff-bar key-cancellation key-signature time-signature custos) (left-edge staff-ellipsis ambitus breathing-sign signum-repetitionis clef key-cancellation key-signature time-signature staff-bar cue-clef custos)) \clef bass \break c,,4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | } I just took the default on https://lilypond.org/doc/v2.24/Documentation/internals/breakalignment and moved "clef" after "staff-bar" in the first list. Best, Jean
OpenPGP_signature
Description: OpenPGP digital signature