Am 15.01.2016 um 18:06 schrieb Chris Yate:
> Hi, 
> 
> I'm trying to typeset a number of short pieces into multiple scores in
> one file. I can do this manually, as:
> ...
> 
> I've attached a ly file including the code I've pasted here.
> 
> thanks, 
> 
> Chris
> 

Hi Chris,

I think (if I didn't misunderstand you) you can achieve what you want
very easily, without any Scheme.

file: score.ily

\score {
  \new Staff \myMusic
}


###
file: music-1.ily

myMusic = { c' }

###
file: music-2.ily

myMusic = { d' }

###
file: my-score.ly

\include "music-1.ily"
\include "score.ily"
\include "music-2.ily"
\include "score.ily"

##################

The idea is that the score expects a certain music variable, and every
time you include that score block it will take what is currently
attached to that name.

You can also take a slightly different approach that *may* be helpful in
more complex situations:

Take the same score.ily and then write

musicOne = { c' }
musicTwo = { c' }

myMusic = \musicOne
\include "score.ily"

myMusic = \musicTwo
\include "score.ily"

You can use that assignment (myMusic = ...) to compose the music
variables for the score block. Such an adaptor pattern can be handy for
supporting different transpositions, for example.

HTH
Urs


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to