lilypond-user
[Top][All Lists]
Advanced

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

Re: Optimising Lilypond source for readability


From: Francisco Vila
Subject: Re: Optimising Lilypond source for readability
Date: Wed, 22 Jun 2011 17:11:38 +0200

2011/6/11 Ben Finney <address@hidden>:
> Howdy all,
>
> The attached document produces the score that I want, but it has a lot
> of repetition and is difficult to read through.
>
> What can I do to “refactor” this document, so that it produces the same
> score but the source is easier to follow and less needlessly repetitive?

Here are some things you can do.

  - Fold the document into multiple files and use \include to join
them. Use a master file for the structure and separate files for the
notes.
  - Use R1*n (where n is a number of measures) instead of r1 | r1 | r1
etc for multiple whole-measure rests.
  - Define as much variables as you can as in musicOne = { ... } and
use them later as in \new Staff { \musicOne }
  - Learn the Scheme scripting language to create repetitive repetition macros.
  - change one-row \column markups to simple markups w/o the \column command.
  - search and replace multiple blank spaces to one single blank space
all through your source file.
  - keep a simple, clear Score structure. Put manual \new StaffGroup
and \new Staff commands when needed.
  - more...

Has the file been converted by a script or robot from another format?


-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com



reply via email to

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