lilypond-user
[Top][All Lists]
Advanced

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

Re: bookpart with variables


From: Xavier Scheuer
Subject: Re: bookpart with variables
Date: Sun, 7 Aug 2011 16:19:49 +0200

On 7 August 2011 00:24, Lance Bradstreet <address@hidden> wrote:
>
> I am trying to put together a book composed of multiple scores.  From
> reading through the archives it seems that variables are not allowed within
> \bookpart.  I was wondering what people do to get around this.  I'd like to
> be able to use the same code for putting together multiple files where some
> files may contain variables and some do not.  I get an unexpected string
> error when I try to use a variable within \bookpart.  I could go through the
> lilypond files and remove the variables and put all the note information
> within \score{} but it seems like there should be a better way.  I'm new to
> Lilypond so I'm hoping someone knows of a better way.
>
> The following code results in an error because bach-invention-01.ly contains
> variables.

I personally use one type of files containing only the music defined as
variables (typically one for each movement and each instrument) and
another type of files containing the \score .

%%%%%%%%

%%%% file "violin-mvt1.ily"

violinMvtI = {
  % music (notes)
}

%%%%%%%%

%%%% file "violin-mvt2.ily"

violinMvtII = {
  % music (notes)
}

%%%%%%%%

%% etc. (other instruments, each movement)

%%%%%%%%

%%%% file "violin-mvt1-score.ly"

\include "violin-mvt1.ily"

\score {
  \violinMvtI
}

%%%%%%%%

%%%% file "book.ly"

\include "violin-mvt1.ily"
\include "violin-mvt2.ily"
% etc. (other instruments, each movement)

\book {
  \bookpart {
    \score {
      \violinMvtI
      % other instruments
    }
    \score {
      \violinMvtII
      % other instruments
    }
    % each movement
  }
}

%%%%%%%%

Cheers,
Xavier

-- 
Xavier Scheuer <address@hidden>



reply via email to

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