5.3 Large projects
When working on a large project, having a clear structure to your
lilypond input files becomes vital.
- Use a variable for each voice, with a minimum of
structure inside the definition. The structure of the
\score
section is the most likely thing to change;
the violin
definition is extremely unlikely to change
in a new version of LilyPond.
violin = \relative {
g'4 c'8. e16
}
…
\score {
\new GrandStaff {
\new Staff {
\violin
}
}
}
- Separate tweaks from music definitions. This point was
made previously, but for large projects it is absolutely vital. We
might need to change the definition of
fthenp
, but then we only
need to do this once, and we can still avoid touching anything inside
violin
.
fthenp = _\markup{
\dynamic f \italic \small { 2nd } \hspace #0.1 \dynamic p }
violin = \relative {
g'4\fthenp c'8. e16
}