bell notificationshomepageloginNewPostedit profiledmBox

Hoots : How to disable or limit compression of over-full pages in Lilypond? Sometimes lilypond tries to use less pages for more music, which is not always wanted. This can be easily fixed by manually adding pageBreak , but sometimes - freshhoot.com

10% popularity   0 Reactions

How to disable or limit compression of over-full pages in Lilypond?
Sometimes lilypond tries to use less pages for more music, which is not always wanted. This can be easily fixed by manually adding pageBreak , but sometimes an automatic solution is needed.

When vertical compression happens, lilypond log shows something like this:

warning: compressing over-full page by 36.9 staff-spaces
warning: page 4 has been compressed

In my particular situation lilypond script is generated by MusicXML analysis program and no manual tweaking of positions or pagebreaks is possible, because we do not know what music user can upload.

How can compression be totally disabled or limited, so that Lilypond would have to add page breaks? Automatic solution is required, which does not include manually tweaking positions of elements and pagebreaks.

Sorry for posting such a big example, but many elements are needed so that page is not enough any more. Here is an example of automatically generated score:

1. Automatic line breaking leads to vertically over-compressing first page (text lines are too close to each other, numbers inside score collide with text spanners):
github.com/rualark/MGen/blob/master/MGen/configs/ly2/debug/compressing/compressed2.ly github.com/rualark/MGen/blob/master/MGen/configs/ly2/debug/compressing/compressed2.pdf
Mirror: lilybin.com/f7wjax/1
Mirror: www.hacklily.org/?edit=rualark/sheet-music/overcompressed.ly
2. Adding just one pageBreak command fixes everything:
github.com/rualark/MGen/blob/master/MGen/configs/ly2/debug/compressing/uncompressed2.ly github.com/rualark/MGen/blob/master/MGen/configs/ly2/debug/compressing/uncompressed2.pdf
Mirror: lilybin.com/7xlar8/1
Mirror: www.hacklily.org/?edit=rualark/sheet-music/uncompressed.ly
I already did a google search of known issues and visited lilypond documentation with no significant progress so far:
lilypond.org/doc/v2.18/Documentation/notation/vertical-spacing http://lilypond.1069038.n5.nabble.com/warning-compressing-over-full-page-by-12-4-staff-spaces-td168716.html

Please help!


Load Full (1)

Login to follow hoots

1 Comments

Sorted by latest first Latest Oldest Best

10% popularity   0 Reactions

As far as I know, you can only tell Lilypond how to space lines within one markup, but not between markups (except perhaps with a padding). This is especially problematic if this markup is not embedded into a Staff context. Maybe I am wrong, though …

So, you should probably not use many single markup macros, but instead make use of a markuplist and wordwrap-lines. This should prevent Lilypond from compressing the spacing between single markup commands. At least, it is worth a try.

You can use one markuplist per paragraph, for example. The spec says, markuplists can span over several pages, so maybe you can even just use one. I don’t know how your script exactly works that generates this output, but maybe this is a feasible solution?

I added snippets from your code and in the following example but reduced it to the most important parts:

version "2.18.2"
language "english"
paper {
#(include-special-characters)
bottom-margin = 0.27in
}
% Your definitions here
markup wordwrap {
bold { "#"2 (from test-vocal-range) Key: G mixolydian }
tiny { "Lyrics:" "sp1." }
}
<<
% Your notes and formatting here
new Staff = "staff1" {
set Staff.instrumentName = markup { teeny override #'(baseline-skip . 2.0) center-column{ "Part" "" "[Soprano]" } }
new Voice { override NoteHead.color=#(rgb-color 1.000 0.000 0.000)
d'1
}
}
% etc.
>>
markuplist {
wordwrap-lines { tiny bold "Part [bar 1, beat 1] note D" }
wordwrap-lines { smaller with-color #(rgb-color 1.000 0.000 0.000) "1 - Melody: Stagnation (5 notes <m3)" }
wordwrap-lines { smaller with-color #(rgb-color 1.000 0.000 0.000) "1 - Melody: Stagnation (5 notes <m3)" }
}
markuplist {
wordwrap-lines { tiny bold "Part [bar 1, beat 1] note D" }
wordwrap-lines { smaller with-color #(rgb-color 1.000 0.000 0.000) "1 - Melody: Stagnation (5 notes <m3)" }
wordwrap-lines { smaller with-color #(rgb-color 1.000 0.000 0.000) "1 - Melody: Stagnation (5 notes <m3)" }
}
% ... and so on


Back to top Use Dark theme