lilypond-user
[Top][All Lists]
Advanced

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

Re: Set /bookOutputName to Conjunction of Variable and String


From: foxfanfare
Subject: Re: Set /bookOutputName to Conjunction of Variable and String
Date: Sat, 19 Oct 2019 03:58:13 -0700 (MST)

David Kastrup wrote
> I don't get your point.  If you say that the assignment is not placed
> somewhere separate from the \include statement, it's a bit hard to see
> why you don't just roll the string in question into the \include
> statement in the first place.  The usual use case for an assignment like
> that is to be able to separate definition and use.

Maybe my objective was unclear. I am working on a quite huge project, a
musical theater made of 35 pieces. I also have to make different version of
the same work, piano solo, easy piano, for a small ensemble, and eventually
for an orchestra. I have decided to divide as much as possible everything in
separate files which could be included in the different versions (the
dialogues, the layout of the score, the notes, the pedals for the piano,
etc.).

In the end, when I create the ly file which will contain only one piece, I
will have that kind of beginning:

\include "articulate.ly"
\include "configuration.ily"
\include "../../ily/liens.ily"
\include "../../ily/global/global.01.ily"
\include "../../ily/pedales/pedales.01.ily"
\include "../../ily/dialogues/dialogues.01.ily"
\include "../../ily/notes/piano-orgue/notes.primo.01.ily"
\include "../../ily/notes/piano-orgue/notes.secondo.01.ily"
\include "../../ily/instrumentation.ily"

and after only the shortcuts which will generate my score, in my case,
something like:

\book {

  \titres-textes
  \paper {
    bookTitleMarkup = \titres-forme
  }

  \score {
    \keepWithTag #'(print piano-orgue I-tag)
    \piano "1" \piece-I.primo
    \header {
      piece = \piece-I.titre
      instrument = "primo"
    }
  }
}

The idea I had was to do something like this:

Create a new file (for instance "links.ily"), which would contain:

\include "articulate.ly"
\include "configuration.ily"
\include "../../ily/liens.ily"
\include #(string-join (list "../../ily/global/global" num "ily" ) "." )
\include #(string-join (list "../../ily/pedales/pedales" num "ily" ) "." )
\include #(string-join (list "../../ily/dialogues/dialogues" num "ily" ) "."
)
\include #(string-join (list "../../ily/dnotes/piano-orgue/notes.primo" num
"ily" ) "." )
\include #(string-join (list "../../ily/dnotes/piano-orgue/notes.secondo"
num "ily" ) "." )
\include "../../ily/instrumentation.ily"

And then in the ily score, I would simply do something like:

num = "01"
\include "links.ily"

\score {
...
}

This would allow me to not write again for all the 35 pieces the same
beginning.
I hope that makes now more sense!




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



reply via email to

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