lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Controlling compilation


From: Jan-Peter Voigt
Subject: Re: Controlling compilation
Date: Mon, 11 Apr 2016 09:16:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

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
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user





reply via email to

[Prev in Thread] Current Thread [Next in Thread]