lilypond-user
[Top][All Lists]
Advanced

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

Re: Identify included files


From: Fr. Samuel Springuel
Subject: Re: Identify included files
Date: Wed, 20 May 2020 12:05:00 -0400

As an exercise in Scheme programming (and because I’m something of a 
perfectionist), I’m working on improving the output when using parse-only.ly by 
having it account for `--format` flags and the various backends when 
constructing the target portion of the make rule (the version I previously 
posted always assumes the target is pdf).  To that end I’ve been exploring some 
of the scheme functions and have come across the ly:output-formats and 
ly:parser-output-name as welll as (ly:get-option 'backend).  However, I have a 
few questions:

ly:output-formats is a list whose contents are determined by the `--format` 
flags.  However, when eps format is requested, ps, not eps is what’s added to 
the list.  To determine that the output is eps I then also need to look at 
(ly:get-option 'backend), which will be eps or ps (or svg or scm, but they only 
produce a single file format, regardless of --format flags).  I’ve also noticed 
that if both ps and eps files are requested with flags, then apparently only 
the eps file is produced, though ly:output-formats will have two ps entries.  
So, my question is can lilypond ever produce both ps and eps file from a single 
run, or does the use of the eps backend preclude the production of ps files?

ly:parser-output-name stores the base name of the output file, but doesn’t 
contain directory information about where the output file is supposed to go 
(unlike the list of files in ly:source-files, which do contain the directory 
information about the location of the source files).  This make sense because 
the output defaults to the current working directory when lilypond is called.  
However, if I use the --output option, I can force LilyPond to switch working 
directories before processing the file (and thus change the destination of the 
output).  However, I cannot find where that directory information is stored.  
Is it stored somewhere (if so, where)?

Use of the -dbackend=eps (or setting the backend to eps in the file) also 
causes the production of several other files (*-systems.tex, *-systems.texi, 
*-systems.count, and the eps and pdf files for each system) while -E (or --eps) 
does not.  So far, however, I haven’t been to determine the difference between 
these two situations.  Is there some variable (or scheme function) that can be 
used to figure out if these files are being produced (and how many systems 
there are)?

Finally, what about midi?  I have yet to find a scheme function that will tell 
me if the file being parsed will produce a midi file when typeset.  Is there 
anything that would do that?

✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036

PAX ☧ ΧΡΙΣΤΟΣ




reply via email to

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