lilypond-devel
[Top][All Lists]
Advanced

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

Re: Allow music of nominally zero duration to be typeset. (issue 6810087


From: Reinhold Kainhofer
Subject: Re: Allow music of nominally zero duration to be typeset. (issue 6810087)
Date: Sat, 17 Nov 2012 01:21:25 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2

On 2012-11-16 23:57, address@hidden wrote:
I have not actually tried to understand the code.  I just added checks
for existing array elements before access until I could no longer make
LilyPond segfault or produce programming errors.

So this is, indeed, strictly a patch on the "won't make things worse"
basis, except for the one, initial removal of a zero-duration check,
necessary for sane behavior in things like incipits without notes.


But that check was added for exactly that reason: To warn the user that no output was produced (apparently, no regtest was added back then). With this patch, even for an empty music, lilypond tries to do the pagebreaking (and reports 0 pages):

-) With this patch applied

address@hidden:~$ lilypond empty.ly
GNU LilyPond 2.17.7
»empty.ly« wird verarbeitet
Analysieren...
Interpretation der Musik...
Warnung: keine Musik in der Partitur gefunden
Vorverarbeitung der grafischen Elemente...
Ideale Seitenanzahl wird gefunden...
Musik wird auf 0 Seiten angepasst...
Systeme erstellen...
Kompilation erfolgreich beendet

-) Without that patch:

address@hidden:~$ lilypond empty.ly
GNU LilyPond 2.17.7
»empty.ly« wird verarbeitet
Analysieren...
Warnung: keine Musik in der Partitur gefunden
Kompilation erfolgreich beendet


So there is a difference (to me, pagebreaking does not make much sense if we already know there will be not output). But that doesn't mean that I'll veto that patch.

The downside are problems with material that indeed produces no
output.  The basic change is simple and just in
lily/global-context-scheme.cc.  All the rest is attempting to remove
programming errors and warnings occuring for basically empty systems.

The current state is that

\new Staff { }

will segfault,

Really? With lilypond 2.17.7 it didn't crash here...

Cheers,
Reinhold

--
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://www.kainhofer.com
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * Edition Kainhofer, Music Publisher, http://www.edition-kainhofer.com



reply via email to

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