[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: \include "*.ly" for only part of a score
From: |
Alex Loomis |
Subject: |
Re: \include "*.ly" for only part of a score |
Date: |
Fri, 3 Jan 2014 09:09:57 -0500 |
In general it's best practice to keep includes at the top of the file, so I
would do it like this:
%file custom.ly
varA = %letter paper; can't check syntax on my ipod so not going to try
varB = %ragged right
%your file
\version "2.18.0"
\include "custom.ly"
\paper{ \varB }
etc.
On Jan 2, 2014, at 9:11 PM, Jay Anderson <address@hidden> wrote:
> On Thu, Jan 2, 2014 at 6:55 PM, guocuozuoduo <address@hidden> wrote:
>> I would like to know how to use the \include command for only part of a
>> score.
>> It is not described in the manual.
>
> sectionA.ily:
> \relative c' {\time 4/4 c1 |}
>
> sectionB.ily:
> \relative c' {e1 |}
>
> score.ly:
> \score {
> \new Staff {
> \include "sectionA.ily"
> \include "sectionB.ily"
> }
> }
>
> (I haven't tested the above, but this shows the idea.)
>
> Alternatively you could assign the sections to variables and use those
> instead of using \include directly:
>
>
> sectionA.ily:
> sectionA = \relative c' {\time 4/4 c1 |}
>
> sectionB.ily:
> sectionB = \relative c' {e1 |}
>
> score.ly:
> \include "sectionA.ily"
> \include "sectionB.ily"
>
> \score {
> \new Staff {
> \sectionA
> \sectionB
> }
> }
>
> -----Jay
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user