lilypond-user
[Top][All Lists]
Advanced

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

Re: Include a file if it exists


From: Urs Liska
Subject: Re: Include a file if it exists
Date: Sat, 06 Sep 2014 12:19:06 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.6.0


Am 06.09.2014 11:43, schrieb Urs Liska:

Am 06.09.2014 00:40, schrieb Urs Liska:

Am 06.09.2014 00:36, schrieb Urs Liska:
Hi all,

I'm looking for a solution to conditionally include a file if it exists

Oops.

Well, the question is real, but of course I intended to add more to it ...

The idea is to include a file with a number of music variables and then include files that contain one music variable each, overriding one variable from the first included file.
So if no file is included the (empty) variable from the first file is used, otherwise the individual variable from the single file.

Urs

A first approach may point in a direction, although it doesn't work at all.

please consider the attached files: collect.ly tries to include 01 through

#(ly:parser-parse-string (ly:parser-clone parser) "\\include \"01.ily\""))
(an approach that worked successfully in another situation).


But obviously it doesn't understand the content of 01.ily, as I get

01.ily:4:3: error: unrecognized string, not in text script or \lyricmode

c d e f g


errors (and subsequently one more for each of the notes).

So how can I include a file containing music variables through Scheme (in order to generate the filenames to be included programatically)?


TIA
Urs


Attachment: 01.ily
Description: Text document

Attachment: collect.ly
Description: Text Data


reply via email to

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