lilypond-user
[Top][All Lists]
Advanced

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

Re: PDF file gets "-1" appended


From: Knute Snortum
Subject: Re: PDF file gets "-1" appended
Date: Tue, 27 Jun 2023 13:55:01 -0700

On Tue, Jun 27, 2023 at 12:19 PM Valentin Petzel <valentin@petzel.at> wrote:
Hello Knute,

so you are using books to allow specification of the midi filename. This is
probably a fine usecase, but it still seems like a bit of an abuse of the book
mechanic to me. Rather I’d adapt the midi output name logic itself.

This code adapts the internal function responsible for writing out the midi
performances (scm/midi.scm:write-performances-midis) in such a way that

A) If we have multiple midi outputs all outputs are numbered starting with 1
(instead of the first not being numbered and the next one starting with 1)
B) The numbering is padded to an equal length (so if you’ve got less than 10
midis you number 1, 2, 3, ..., under 100 01, 02, 03, ...)
C) The midi performance title (if set midititle else title else "") (if set)
is used as suffix.
D) The header property midiOutputSuffix may be used to override this suffix
E) The header property midiOutputFile may be used to override the full midi
file name

This has the advantage over abusing Books that it specifies the names at the
relevant position, not at a higher position.

 Wow.  Thanks for that very comprehensive solution.  I appreciate it.

--
Knute Snortum 

reply via email to

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