Re: Clef change after end-repeat before break -- how?
>> 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. It's expected. 2.22 doesn't accept mid-measure breaks without a bar line. You need \bar "" to allow a break in that version. OpenPGP_signature Description: OpenPGP digital signature
Re: Clef change after end-repeat before break -- how?
On 28/01/2023 06:52, Ole V. Villumsen wrote: > 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. OK, I dug a bit, and although I still find your original code dubious, it turns out that there is a genuine bug. See https://gitlab.com/lilypond/lilypond/-/issues/6524 OpenPGP_signature Description: OpenPGP digital signature
Re: Clef change after end-repeat before break -- how?
On 28/01/2023 16:51, David Kastrup wrote: > Jean Abou Samra writes: > >>> Le 28 janv. 2023 à 08:01, Darren Ng a écrit : >>> >>> [subject] How to define a macro that expands to a percussion "pitch"? >> >> >> It may be worth noting that LilyPond does not have macros, only >> variables and regular functions. Call me pedantic, but I think it is >> helpful not to conflate the two. > > It's a hybrid, actually. In Lispy terms, the difference between a > function and a macro is that a function evaluates its arguments while a > macro evaluates the result of executing the macro body on the > unevaluated arguments. > > LilyPond evaluates a music/event/scheme/void function's body after > reading its arguments but the reading/interpretation of the arguments is > directed by the predicates. > > So a music/event/scheme/void function does evaluate some of its parts > (the predicates) in order to direct the syntactic interpretation of its > arguments. OK, I grant you that. Still very different from the concepts of "macros" found in Scheme, Lisp, C, TeX or Rust, though. >> There is no way in LilyPond to make a variable "just be replaced by >> this code". Sometimes users get confused by this (I remember a >> question about defining a chord modifier, which was similar to this >> one). Instead, there are functions, as well as some other mechanisms >> like drumPitchNames. > > In general, things are not purely functional but the categories and > interpretation change around more by ad-hoc conditions than a cohesive > macro mechanism. Yup. OpenPGP_signature Description: OpenPGP digital signature
Re: Clef change after end-repeat before break -- how?
Furthermore, for the record, the same trick also works in the case where there is no break after the end-repeat sign. In this case the second of the three inner lists in Score.BreakAlignment.break-align-orders governs the order. So I want to modify both the 1st and the 2nd list. From the documentation: > This is a vector of 3 lists: #(end-of-line unbroken start-of-line). Having different scores and parts of the same music I now end up with clearly more readable and sensible Lilypond source than I had before. And nicer typeset music. Hallelujah, as Mr. Handel wrote. /Ole Sent with Proton Mail secure email. --- Original Message --- On Saturday, January 28th, 2023 at 06:52, Ole V. Villumsen wrote: > 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 j...@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
Re: Clef change after end-repeat before break -- how?
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 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
RE: Clef change after end-repeat before break -- how?
Ole, Under 2.22 I do not get extra space. Mark -Original Message- From: lilypond-user-bounces+carsonmark=ca.rr@gnu.org [mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of Ole V. Villumsen Sent: Friday, January 27, 2023 1:35 PM To: lilypond-user@gnu.org Subject: Clef change after end-repeat before break -- how? 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? * Constructive question: how to avoid it? * Real question: How do I set the clef nicely immediately after the end-repeat with minimal space between? Cheers, Ole Sent with Proton Mail secure email. repeat-clef.pdf Description: Adobe PDF document
RE: Clef change after end-repeat before break -- how?
Ole, Maybe \override Score.BreakAlignment? Mark -Original Message- From: lilypond-user-bounces+carsonmark=ca.rr@gnu.org [mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of Ole V. Villumsen Sent: Friday, January 27, 2023 1:35 PM To: lilypond-user@gnu.org Subject: Clef change after end-repeat before break -- how? 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? * Constructive question: how to avoid it? * Real question: How do I set the clef nicely immediately after the end-repeat with minimal space between? Cheers, Ole Sent with Proton Mail secure email.
Re: Clef change after end-repeat before break -- how?
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
Re: Clef change after end-repeat before break -- how?
On Fri, Jan 27, 2023 at 1:36 PM Ole V. Villumsen < ole.villum...@protonmail.ch> 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? > * Constructive question: how to avoid it? > * Real question: How do I set the clef nicely immediately >after the end-repeat with minimal space between? > > Cheers, Ole > > Sent with Proton Mail secure email. Hi, Ole - Boy, I thought that would be simple, but I can't figure it out. I thought I had examples, but maybe it's always been with alternatives. Anyone else? All the best, Ralph