[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Clef change after end-repeat before break -- how?
From: |
Ole V. Villumsen |
Subject: |
Re: Clef change after end-repeat before break -- how? |
Date: |
Sat, 28 Jan 2023 05:52:08 +0000 |
Thanks, everyone, for your contributions.
First of all Jean. Your code gives me exactly what I wanted. I haven’t learned
to use the internals, but see here that it’s useful.
> 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 am skeptical. There’s no separate measure there.
When I move the setting of the measure position to later in the bar,
I still get the same space (but then not the measure number, 5,
on the 2nd line, which makes sense). So still curious.
@Mark
> Under 2.22 I do not get extra space.
That’s still more curious. On 2.22.2 I get a warning
that the break is overwritten by another event, so we
don’t get the line break that I had specified and wanted.
@Ralph Palmer, you may have forgot to put content into your message? At least
none arrived here.
Best, Ole
Sent with Proton Mail secure email.
------- Original Message -------
On Saturday, January 28th, 2023 at 00:09, Jean Abou Samra <jean@abou-samra.fr>
wrote:
> 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