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: Aaron Hill
Subject: Re: Set /bookOutputName to Conjunction of Variable and String
Date: Sat, 19 Oct 2019 04:52:18 -0700
User-agent: Roundcube Webmail/1.3.8

On 2019-10-19 3:58 am, foxfanfare wrote:
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!

Would using a function help?

%%%% main.ly
\version "2.19.83"

fetch = #(define-scheme-function (pet) (string?)
  #{ \include #(string-join (list pet "ily") ".") #})

\fetch "kitten"
\fetch "puppy"
%%%%

%%%% kitten.ily
\version "2.19.83"
\markup "I like kittens."
%%%%

%%%% puppy.ily
\version "2.19.83"
\markup "I like puppies."
%%%%


-- Aaron Hill



reply via email to

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