Re: Control breaks in staff that I get from a variable?
On 10/03/2024 12:41, Ole V. Villumsen wrote: 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. Also a cross-reference at least in NR 4.3.1 "Line Breaking". (v2.24.3) -- https://saturday-october-seven.com/
Re: Control breaks in staff that I get from a variable?
Le dimanche 10 mars 2024 à 18:33 +, Werner LEMBERG a écrit : > > Can you provide some additional sentence or sentences for the > documentation so that we have something to start with? See also https://gitlab.com/lilypond/lilypond/-/issues/6439 signature.asc Description: This is a digitally signed message part
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. Can you provide some additional sentence or sentences for the documentation so that we have something to start with? Werner
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.
Re: Control breaks in staff that I get from a variable?
> As some of us know, this does not work: > > << > \staffIGot > { s1*5 \break } > >> > > It introduces an extra staff. Not wanted. The classic fix is << \new Devnull { s1*5 \break } \staffIGot >> Best, Jean signature.asc Description: This is a digitally signed message part
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.