lilypond-user
[Top][All Lists]
Advanced

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

Re: Include files into one score


From: Urs Liska
Subject: Re: Include files into one score
Date: Tue, 03 Aug 2010 23:12:00 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.11) Gecko/20100711 Lightning/1.0b1 Thunderbird/3.0.6

Am 03.08.2010 21:11, schrieb pwf100220:
(I'm new)

I wrote three parts of a song separately because they were becoming a little
overwhelming.  I want to \include the three files into one but I'm doing
something wrong.  It only includes the last file and uncommenting it only
includes the 2nd file and so on.  Is it possible to include all three in
this manner?

\include "File 1"
\include "File 2"
\include "File 3"

\score {
       \new ChoirStaff<<........etc.

-------------------------------------------------

The three files used to stand alone but I commented out the \score
{.........
I would prefer not to have a file for each part and include them (as
suggested by the docs) because I am very comfortable with my current
organization.

Thanks for your advice.
This very much depends on the real content of your files.
If the files "used to stand alone" and you have some sort of "organization" I suspect you will have variables with the same name in your included files.
In such a case later definitions just overwrite earlier ones.

To \include a file is the same (for the lilypond parser) as writing the contents of the included file directly in the main file.

To make it clear have a look at this example:
if you define the variable "music" twice like this:

music = \relative c' {
  c4 d e f g1
}
music = \relative c {
  c2 a d1
}

The first definition is discarded.
If you \include two files which define a variable "music" it will look like the first file isn't included.

The same goes for variables in \header or \paper blocks.

HTH
Urs



reply via email to

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