On 26/05/2020 16:15, Fr. Samuel Springuel wrote:
I’ve already accounted for this in my most recent version of
parse-only.ly. It’s not as straight forward as ly:source-files but by
looking at (ly:get-option 'backend), (ly:get-option 'aux-files),
(ly:parser-output-name) and (ly:output-formats), it is possible to
determine which output files lilypond is going to produce (except for
the midi, I have yet to find any option or function which will
indicate that a midi is being produced). The applicable code is:
Maybe this code can give some hints on how to decide if midi is being
produced.
\version "2.20.0"
#(define (outputdeftype def)
(cond
((ly:output-def-lookup def 'is-layout #f) (display "\nlayout"))
((ly:output-def-lookup def 'is-midi #f) (display "\nmidi"))))
\book {
\score {
{ c'1 }
\layout{}
\midi{}
}
#(for-each
(lambda (score) (for-each outputdeftype (ly:score-output-defs score)))
(ly:book-scores $current-book))
}
--
Timothy Lanfear, Bristol, UK.