Hi David,
compileA is not compiled, because it is just a music-expression inside a
scheme-expression.
But if you add it to the current book, it will appear. So your example
will work with a tiny extension:
#(if sectionA (add-score #{ \compileA #} ))
But you should look around for templating mechanics.
HTH
Jan-Peter
Am 11.04.2016 um 08:32 schrieb David Sumbler:
When editing a piece with several instruments and several movements,
there are various outputs I would like, such as a complete full score, a
full score of a single movement, a complete instrumental part, the
instrument part of a single movement, and also a midi file of any of
these items.
I thought perhaps I could control this in my top-level file by having
the compilation instructions for these possibilities defined in
variables in an included file, and simply defining variables (or not, if
there is a way of checking the existence of a variable) in the top level
file.
As an experiment, I produced this:
File: experimentNotes.ly
\version "2.19.24"
compileA =
\score {
\new Staff {
a' a' a' a'
}
\layout { }
}
compileB =
\score {
\new Staff {
b' b' b' b'
}
\layout { }
}
File: experiment.ly
\version "2.19.24"
\include "experimentNotes.ly"
sectionA = ##t
#(if sectionA #{ \compileA #} )
\compileB
When I compile experiment.ly, the "B" section compiles and no errors or
warnings are produced, but section "A" is ignored.
Can this be modified to make it work?
David
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user