lilypond-user
[Top][All Lists]
Advanced

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

Re: The best way to structure multi-file projects?


From: Keith OHara
Subject: Re: The best way to structure multi-file projects?
Date: Fri, 17 Dec 2010 05:54:44 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Frank Steinmetzger <Warp_7 <at> gmx.de> writes:

> This work (namely Bach’s Mass in B minor, BWV 232) has 27 pieces, hence I 
wanted to make it as easy as possible to work on single pieces at a time, but 
also to compile the whole thing.
> 
> So, of course, each piece is in an own file again. But this time, I wanted to 
> have everything that is needed to load a piece in one single line (so they 
can be switched on and off the easiest).
> 
> 
> As a result, the piece files now contain the entire score block, plus 
variable 
> definitions for all staves and lyrics to be used within the \score. 

I am easily confused, so I keep the structure (\bookpart \score \new Staff, 
etc.) in one file where I can see it all at once.  This means that I need to 
use {% %} to switch on/off typesetting of pieces (instead of a single-line %) 
but that is easy enough.

I have been happy with an organization like this:

(1) a file "header.ily" containing all the definitions that might be used more 
than once,

common = { % settings for the beginning of each movement/piece
  \override Score.PaperColumn #'keep-inside-line = ##t
}
\include "english.ly" 
fzp = #(make-dynamic-script "fzp")
\header {
  composer = "Bach"
  [...]

(2) a few files with names like "strings.ily" that contain only variable 
definitions.  Each variable holds all the notes in one movement/piece for one 
instrument.  One special variable (same as your variable 'control') holds 
everything that affects all instruments, such as tempo changes, repeats, 
rehearsal marks, and settings that apply to the whole score.  

violinImI = \relative c'' {
  \key d\major
  a4\p\< ... 
  \cueDuring "v2" #UP R1*2
  [...]

controlmI = {
  \common % from "header.ily"  
  \override Score.Hairpin #'minimum-length = #4
  \time 4/4
  [...]


(3) one file for each section of final output, with names like 
"StringParts.ly" :
\include "header.ily"
\include "strings.ily"
\include "percussion.ily"
[...]
\addquote "v2" \violinIImI
\paper {...}
\book {
  \header { instrument = "Violin I" }
  \score {
    \keepWithTag#'part \new Staff <<
      \compressFullBarRests
      \violinImI
      \controlmI
[...]

(4) temporary files with names like "strings.ly" that can be compiled by 
LilyPond to produce a .pdf of only the section I am currently working on.  My 
text editor has a shortcut to run LilyPond on "_foo_.ly" when I am editing 
"_foo_.ily".  I make a copy one of the files in (3) and %{ %} comment out or 
delete the parts I want to leave out.

(You might be interested to see the rather different method that Jay Anderson 
used to set some horn concertos,
http://www.mutopiaproject.org/cgibin/piece-info.cgi?id=1735)




reply via email to

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