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