lilypond-devel
[Top][All Lists]
Advanced

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

Re: \displayLilyMusic and default durations


From: David Kastrup
Subject: Re: \displayLilyMusic and default durations
Date: Wed, 18 Feb 2015 21:01:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

"Trevor Daniels" <address@hidden> writes:

> David Kastrup wrote Wednesday, February 18, 2015 6:00 PM
>
>> More seriously, currently \displayLilyMusic deals badly with
>> { c4 c4 8 8 4 } which gets rendered as { c4 c 8 8 4 } and does
>> consequently not recreate its input.  It would be rather tricky to fix
>> that since by the time the 8 is printed, c and the following space have
>> already been produced.  Instead of making things even more complex here,
>> I consider it saner to become less clever and just print what's in the
>> data, never mind whether it's possibly redundant.
>> 
>> Opinions?
>
> Agreed.  It would be nice if \displayLilyMusic produced a canonical
> form (using the "preferred notation" meaning) but we're a long way
> from that.

I think that we won't be writing human-readable LilyPond files from
within LilyPond.  If we put out a predictable stream, the human-friendly
formatting (linebreaks, linelengths, indentation) from that is more in
the ballpark of Emacs or Frescobaldi.

> In the meantime, producing correct LilyPond input is far more
> important.

I was not suggesting that "producing correct LilyPond input" would be
impossible while keeping the default durations omitted as a rule.  It
would just further complicate the printing code, so I am more or less
using the currently not-always-correct output as an opportunity for
stopping to invest the effort for exploiting this redundancy: it's
becoming more tricky (but by no means impossible) to know when it will
work and when not.  And actually, it was quite a bit of experimentation
getting the examples in input/regression/display-lily-tests.ly to
combine in a manner where there respective "leave off duration"
decisions check out.  Making them work independently from one another is
going to remove at least one source of "Huh?".

I do like the prospect of making input/music/output match closer.  That
was one aim of the somewhat repercussion-heavy issue 2240 which made cis
differ from <cis>.  Stopping \displayLilyMusic from omitting possibly
redundant durations is much less likely to cause unexpected side
effects.

-- 
David Kastrup



reply via email to

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