[Top][All Lists]

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

Re: Disconnected

From: Han-Wen Nienhuys
Subject: Re: Disconnected
Date: Fri, 28 Jul 2006 15:19:35 +0200
User-agent: Thunderbird (X11/20060614)

Erik Sandberg schreef:
On 7/27/06, Han-Wen Nienhuys <address@hidden> wrote:

Just send me the patch, I'll see what I can do.

The attached patch converts all try_music functions in * The
conversion is trivial in most cases; there are however a couple of notes:

0. When a translator only can handle one event each moment, the
corresponding listen_* method should display a warning on the second
simultaneous such event. This previously happened with e.g.
simultaneous lyric events: try_music returned false on the second
event, which gave a 'junking event' warning. I have implemented this
behaviour with a macro
ASSIGN_EVENT_ONCE (event_, ev)
which corresponds roughly to
if (!event_) event_=ev; else warning (...);
The macro isn't used by all translators yet.

IMO, (almost) all occurences of
event_ = ev
inside listen_* methods should be changed into
ASSIGN_EVENT_ONCE (event_, ev)
because a warning should be displayed if a nonzero event_ is
overwritten, since information is lost. Do you agree?


1. some engravers read the 'name property of music and use it to play around
with strings. I tried a couple of different approaches:
- dynamic-engraver: name is only used tested for equality, so just test
against 'class instead.
- paper-column-engraver: Convert event-class to string on the fly
- piano-pedal-engraver: Calculate data statically from event-class
name at program

I think a more proper solution would be to store e.g. the grob names of
piano-pedal as immutable properties in stream-events. I don't think it's
worth the added complexity though, because very few event types will
use immutable properties.

2. I discovered that there are abstract engravers (all related to ligatures).
I chose a simple approach to convert these: the subclasses of abstract
engravers don't automatically inherit the listeners of the base class.
I think it's possible to change that, but I don't think it's worth it
yet (there are too few abstract engravers).

The ligature stuff is kind of strange anyway. Permission given to break it.

4. As a part of (3), I needed to make stream events transposable. As a
part of this, I extracted most of Music::transpose to a new function
which is useful for stream-events as well. I think it would be nice if
transposition was reworked to be non-destructive, and the patch is a
step in that direction; please complain if you don't agree.

5. We need to eliminate melisma-translator somehow, because it transfers
information from engravers to iterators. The patch changes the definitions of \melisma/\melismaEnd to directly generate PropertySet/Unset music events. An
alternative would be to keep the ManualMelismaEvent music, as a non-event
iterated by a softcoded sequential-iterator.

it might even be better to write a \melisma { ... } function which changes the lyrics input suitably.

And a completely unrelated issue:
The 2.9.13 source tarball contains the files ./configure, ./aclocal.m4,
which shouldn't be there. Something might be missing in an upload script.

it's on purpose. This makes building from source easier.


Han-Wen Nienhuys - address@hidden -

LilyPond Software Design
 -- Code for Music Notation

reply via email to

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