2011/6/11 Ben Finney <[email protected]>:
> 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
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user