|
From: | Jean Abou Samra |
Subject: | Re: Compilation time (was: Generate \scaleDurations procedurally) |
Date: | Tue, 13 Jun 2023 11:11:38 +0200 |
User-agent: | Evolution 3.48.3 (3.48.3-1.fc38) |
Le mardi 13 juin 2023 à 09:16 +0200, Lib Lists a écrit :
Hello,
When trying to compile the complete score of the piece below (88 staves and 120 quarter notes), I noticed it was taking many hours (I didn't finish the compilation). Trying with shorter versions, I got the following compilation times:
- 2x quarter notes -> 16.7",
- 4x quarter notes -> 1'17",
- 8x quarter notes -> > 57'47" (!)
Is there anything that could be optimised to reduce the compilation time? I'm afraid the final version could potentially take many days to compile.
I'm on a MacBook Air M2 with macOS Ventura 13.4, Lilypond 2.25.5
This looks like an unhappy path in the page breaker. For its defense, your score creates an extremely unusual situation with respect to page breaking. Namely, because you allow breaks at any point and all staves are desynchronized by small amounts, there is a huge density of possible page breaking points per unit of time. Usually, there wouldn't be more than ~15 page breaking points per line, your score has hundreds.
I recommend removing
forbidBreakBetweenBarLines = ##f
as well as
\context {
\Voice
\remove Forbid_line_break_engraver
}
and inserting any breaks you need by hand, by adding something like \new Devnull { s1 \break ... }
within the \new StaffGroup << ... >>
.
For me, this compiles within a minute or so:
\version "2.25.5"
#(set-default-paper-size "a0")
#(set-global-staff-size 15)
mus = { \relative c''''' \repeat unfold 80 { c c c c }}
#(define my-semitone->pitch
(make-semitone->pitch
(music-pitches #{ { c cis d ees e f fis g gis a bes b } #})))
\new StaffGroup <<
#@(map (lambda (i)
#{
\new Staff {
\scaleDurations #(cons 120 i) {
\transpose c' #(my-semitone->pitch (- (- 120 i))) {
#(cond
((<= 108 i 120) #{ \ottava 2 #})
((<= 97 i 107) #{ \ottava 1 #})
((<= 72 i 96) #{ \ottava 0 #})
((<= 48 i 71) #{ \clef bass #})
((<= 33 i 47) #{ \clef bass \ottava -1 #} )
(else #{ #}))
\mus
}
}
}
#})
(iota 88 120 -1))
\new Devnull \scaleDurations 120/32 \repeat unfold 8 { s1*10 \break }
>>
\layout {
indent = #0
\context {
\Score
\override SpacingSpanner.base-shortest-duration = #(ly:make-moment 1/4)
proportionalNotationDuration = #(ly:make-moment 1/10)
\override SpacingSpanner.uniform-stretching = ##t
\override SpacingSpanner.strict-note-spacing = ##t
\cadenzaOn
}
\context {
\Staff
\remove Time_signature_engraver
}
}
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] | Current Thread | [Next in Thread] |