lilypond-user
[Top][All Lists]

## Re: Complex/Large Lilypond projects and build automation

 From: Rembrandt Wolpert Subject: Re: Complex/Large Lilypond projects and build automation Date: Sun, 8 Dec 2019 09:04:29 +0100 User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.9.1

On 12/8/19 07:43, Urs Liska wrote:
>
>
>> Hello folks,
>>
>> I’ll look into those alternative build systems.
>>
>> Urs, where can I find a MWE of LuaLaTeX use for LilyPond? Didn't find
>> any when I seached the web recently.
>> I have MacTeX 2019 installed.
>>
>
> I only have one real example so far, and this is *far* from minimal - but
> includes an extensive documentation.
> I'll discuss whether it is time to make this freely available now or if I can
>
> Urs
>
>
>> JM
>>
>>> Le 8 déc. 2019 à 00:17, David F. <address@hidden> a écrit :
>>>
>>>
>>> On Dec 7, 2019, at 2:35 PM, Jim Duke <address@hidden
>>>
>>>> I have a large Lilypond project for several hymnals.  The project is
>> organized into a subdirectory structure with each hymn in a separate
>> directory.  For each hymn I produce several products: an 8.5x11 PDF, a
>> 6x9 PDF, a set of images formatted for projection at 4x3 and 16x9
>> aspect ratios, and a set of part dominant MP3’s for use in learning the
>> hymns.  These products are then assembled at a higher level into a
>> comprehensive PDF of the hymnal including front material and index; and
>> a package of the slide images organized to be compatible with a Slide
>> production product used at my church for assembling a song service; as
>> well as assembling metadata files to be uploaded into a website I
>> maintain that provides access to these hymns and provides simple search
>>>>
>>>> I use Make (that old workhorse) to automate the process; but that
>> has some distinct limitations.  So I was wondering what tools others
>> may be using to aid them in building larger Lilypond projects.  What,
>> if anything, are you using?  How well does that work for you?
>>>
>>> Jim, I’m right behind you!  I have a collection of just over 100
>> hymns that are mostly Spanish language, but about 20 of those also have
>> bilingual versions.  My build system creates proof PDFs, 4x3 and 16x9
>> slide images and 4x3 and 16x9 PowerPoint slide decks which get
>> synchronized to a shared Dropbox folder.  I started off with make, but
>> switched to gradle because I was already using that at work.  I’ve got
>> about 400 lines of Kotlin/gradle code.  I haven’t built any hymnals
>> yet, but I plan to.
>>>
>>> So far I feel like I’ve gotten further with gradle than I could have
>> with make, but lately I’ve found gradle to be more and more annoying.
>> Both make and gradle struggle with 1-to-many and (especially) many-to-1
>> type build tasks.  So, for example, taking 8 png files and combining
>> them into one Powerpoint file is doable in gradle, but you’re really
>> fighting the build system and incremental builds start to fail in
>> certain cases (like when a song goes from fitting on 6 slides to taking
>> up 8 slides).  There are other annoyances.
>>>
>>> Just a couple of weeks ago, I came across this blog post:
>>>   "The only build system that might someday replace make”
>>>   https://apenwarr.ca/log/20101214 <https://apenwarr.ca/log/20101214>
>>>
>>> So I intend to dig in to the design of the redo system and see if it
>> can match the functionality provided by gradle without the pain and
>> annoyances.
>>>
>>> David
>>>
>

To follow up on lyluatex: it work(s|ed) perfectly well for even very
large musicological projects with hundreds of small examples. However,
we hit a snag with the coming upgrade of luatex/lualatex to
luahbtex/luahblatex. If you want to make use of the Renderer (eg.
Renderer=Harfbuzz), it throws errors. Without the Renderer it works (but
if you need it for a complex script, as I do) you will have to revert to
lilypond-book and the usual makefile process.

Here's the hickup (probably easily fixed, Urs?) that interrupts
compilation in a small examples:

\documentclass{article}
\usepackage{fontspec}
\setmainfont[Renderer=Harfbuzz]{TeX Gyre Schola} % with problem
%\setmainfont{Tex Gyre Schola}                   % no problem
\usepackage[nofragment, insert=systems]{lyluatex}
\begin{document}
% \nonstopmode % then it throws the errors, but continues and gives
% result as expected, but it won't stop of course for
% all other errors I do want to see and stopped for...
\lysetoption{staffsize}{13}
\noindent This compiles fine with lualatex-dev *without a Renderer*
\begin{lilypond}
{
c'4 d' e'8 f'8 g'4.
}
\end{lilypond}
Two sets of errors *with* Renderer.
\end{document}

The errors thrown are:
...al/texlive/2019/texmf-dist/scripts/lyluatex/lyluatex.lua:1335:
attempt to in
dex a nil value (field 'rawdata')
stack traceback:
...al/texlive/2019/texmf-dist/scripts/lyluatex/lyluatex.lua:1335: in
function
'lyluatex.lua.get_font_family'
[\directlua]:1: in main chunk.
\ly@currentfonts ..._font_family(font.current()))}
\rmfamily \edef
\rmfamilyi...

l.14 \end{lilypond}

...al/texlive/2019/texmf-dist/scripts/lyluatex/lyluatex.lua:1335:
attempt to in
dex a nil value (field 'rawdata')
stack traceback:
...al/texlive/2019/texmf-dist/scripts/lyluatex/lyluatex.lua:1335: in
function
'lyluatex.lua.get_font_family'
...al/texlive/2019/texmf-dist/scripts/lyluatex/lyluatex.lua:1349: in
function
'lyluatex.lua.set_fonts'
[\directlua]:1: in main chunk.
\ly@currentfonts ..., \sffamilyid , \ttfamilyid )}
\endgroup
l.14 \end{lilypond}

If you don't need the Renderer option, lyluatex is already now the way
to go.

Rembrandt