On Mon, 2023-12-11 at 17:22 +0100, Jean Abou Samra wrote: > > We need a copy so we can introduce the space time dumper code which > > boils down to a simple /include statement at the very top of the > > file. > > You can do that via the -dinclude-settings option instead.
Good to know, thanks. > > It looks like ly2video also removes any \break, \noBreak, and > > \pageBreak it finds in the input. > > > > I don't understand why it needs to do this. \break and \pageBreak are > ignored with #ly:one-line-breaking anyway. I'd guess #ly:one-line-breaking didn't exist in the beginning. If #ly:one-line-breaking ignores breaks, then yes there's probably no need to remove them. I'll do some testing. There is a case where I want to create a narrower page for a narrower screen. I can easily append a /paper {} block to the original file to do this. However, any manual breaks will probably not work at this newer width. How would you recommend dealing with this? > ly2video or not, you need to unfold repeats as soon as you want > correct MIDI output. I agree that requiring to do it explicitly is > not very user-friendly, but auto-adding \unfoldRepeats sounds like > solving the problem at the wrong level. Also, what ly2video does is I don't disagree. It would be great if lilypond had an option to unfold everything, but I suspect that it's hard to do? > not always correct since \score { \midi { ... } \music } is valid but > \score { \unfoldRepeats \midi { ... } \music } is not — it would need > to be \score { \midi { ... } \unfoldRepeats \music }. To be fair, all the examples I've seen put the \midi block after the music. Usually after \layout or in place of \layout if no print output is required. In the case of the second example, the user would probably get an error message that wasn't terribly helpful. I will at least add what you said as a comment in the code. Certainly in my own usage, I've never faced that issue. And it doesn't appear to be an open issue in github. Unless there's a better way, it's probably not the worst thing to do. > Lastly, I'm not sure why ly2video wants to parse the header block but > the --header option may help. l2video wants to parse the header block so it can create a title page for the video. ly2video doesn't want lilypond to put a title on the score. So after scraping the \header fields, it doesn't write those \header fields to the file it ultimately sends to lilypond to process. No \header means no title in the score. No headers and footers are desired too. I know that #ly:one-line-breaking omits these things, but #ly:one-page- breaking may not. So there's still a need to deal with the \header fields. That --header option looks like just the thing to get desired details in my case. I will do some testing.