Re: Centered number of bars of multi-measure rest in piano staff?
Nice, Knute, thanks, that gives me what I wanted. I had had something similar in mind, but wasn’t able to carry it out. Sent with [Proton Mail](https://proton.me/) secure email. On Wednesday, May 22nd, 2024 at 20:36, Knute Snortum wrote: > On Wed, May 22, 2024 at 10:43 AM Ole V. Villumsen > wrote: > >> Just like in a piano staff we can have centred dynamics between the two >> staves, can Lilypond also centre the number of bars a multi-measure rest >> lasts? > > This is how I would do it: > > %%%\version "2.24.3" > > musicOne = { > \clef bass > \key f \major > \time 3/8 > \partial 8 > \omit MultiMeasureRestNumber > r8 | R4.*7 | > } > > musicTwo = { > \clef bass > \key f \major > \time 3/8 > \partial 8 > r8 | \offset MultiMeasureRestNumber.Y-offset 1 R4.*7 | > } > > \new PianoStaff << > \new Staff \compressMMRests \musicOne > \new Staff \compressMMRests \musicTwo >>> > %%% > > The key points are omitting the multi measure rest number in the right hand > and moving the number up in the left. > > -- > Knute Snortum
Re: Control breaks in staff that I get from a variable?
> The classic fix is > > << > \new Devnull { s1*5 \break } > \staffIGot > >> This was exactly what I was after. It’s nice and simple and works well. Thank you. I might wish for it being better documented. I see Devnull documented well in the Internals Reference, but I didn’t readily see it mentioned in the Notation Reference. Not that I know exactly where it would fit well. I needed it in the context of https://lilypond.org/doc/v2.24/Documentation/notation/different-editions-from-one-source. It might not be the right place.
Control breaks in staff that I get from a variable?
**Question in short**: Suppose I have a staff in a variable. Can I impose breaks (line breaks, page breaks, page turns) on that staff without modifying the variable? My use case is using the staff in a part and in a score with other parts, where obviously the breaks need to be different. Another use case could be using the staff on different page sizes. **My research**: I am assuming for example staffIGot = \new PianoStaff << %{ ... %] >> As some of us know, this does not work: << \staffIGot { s1*5 \break } >> It introduces an extra staff. Not wanted. I can trivially pick the staff apart and put parts ("voices" in Lilypond) into different variables that I can then combine with each other and with my desired breaks. It will be wordy and a bit error-prone (in particular with a piano staff with centred dynamics). You may say that my question is really a "luxury" one: can I avoid having to do this? **My solution until now**: Here’s the best I have thought of: I put the staff in a separate source file (which I would want to do anyway), for example: staffIGot = \new PianoStaff << \new Staff << \imposedBreaks % music goes here >> \new Staff { %{ more music here %} } >> As you can see, my staff now uses a variable \imposedBreaks that it does not define. So when I use the staff, I first define my desired breaks in there: \version "2.24.3" imposedBreaks = { s1*6 | \break } \include "includeFileWithStaff.ly" \new Score \staffIGot This seems to give me my desired behaviour. I find it a bit tricky. A further downside is I also need to define imposedBreaks in scores where I don’t want to control breaks manually (I can define it empty). **Question more precisely**: Is there a better, simpler, less tricky solution? Sent with Proton Mail secure email.
Re: Extra space before line break before ossia staff
Solved with \set Staff.explicitKeySignatureVisibility = #end-of-line-invisible \version "2.24.3" \layout { ragged-right = ##t } mainKey = { \key es \major } \new StaffGroup { \new Staff = main \relative { \mainKey g'1 | \break << { g1 } \new Staff \with { alignAboveContext = main } { \set Staff.explicitKeySignatureVisibility = #end-of-line-invisible %% <-- The solution \mainKey g4 f g2 | } >> } } Sent with Proton Mail secure email. On Tuesday, November 28th, 2023 at 09:20, Ole V. Villumsen wrote: > It seems to me that when an ossia staff (or similar supplementary staff) > happens to begin at a line break, Lilypond meaninglessly sets space apart for > a key signature before the line break even though there is no key signature > printed there. Is this a bug? Is there a workaround? > > The output from the snippet below is in the attachment. At the right end of > the first staff there is extra space between the bar line and the end of the > staff. > > In C major (no key signature) all is fine, there is no extra space. > > \version "2.24.3" > > \layout { > ragged-right = ##t > } > > mainKey = { > \key es \major > } > > \new StaffGroup { > \new Staff = main \relative { > \mainKey > g'1 | > \break > << > { g1 } > \new Staff \with { > alignAboveContext = main > } > { > \mainKey > g4 f g2 | > } > >> > > } > } > > Sent with Proton Mail secure email. start-ossia-at-line-break.pdf Description: Adobe PDF document
Extra space before line break before ossia staff
It seems to me that when an ossia staff (or similar supplementary staff) happens to begin at a line break, Lilypond meaninglessly sets space apart for a key signature before the line break even though there is no key signature printed there. Is this a bug? Is there a workaround? The output from the snippet below is in the attachment. At the right end of the first staff there is extra space between the bar line and the end of the staff. In C major (no key signature) all is fine, there is no extra space. \version "2.24.3" \layout { ragged-right = ##t } mainKey = { \key es \major } \new StaffGroup { \new Staff = main \relative { \mainKey g'1 | \break << { g1 } \new Staff \with { alignAboveContext = main } { \mainKey g4 f g2 | } >> } } Sent with Proton Mail secure email. start-ossia-at-line-break.pdf Description: Adobe PDF document
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
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.