Large projects - GNU LilyPond
Description: GNU LilyPond

Previous: Typesetting existing music, Up: Suggestions for writing LilyPond files

#### 4.1.3 Large projects

When working on a large project, having a clear structure to your lilypond files becomes vital.

- Use an identifier 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 c'' {
           g4 c'8. e16
           }
           ...
           \score {
             \new GrandStaff {
               \new Staff {
                 \violin
               }
             }
           }

- Separate tweaks from music definitions. This point was made in General suggestions, 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 c'' {
           g4\fthenp c'8. e16
           }

Previous: Typesetting existing music, Up: Suggestions for writing LilyPond files

This page is for LilyPond-2.10.33 (stable-branch).

Other languages: French.