lilypond-devel
[Top][All Lists]
Advanced

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

Re: New attempt on tuplets/percent repeats


From: Erik Sandberg
Subject: Re: New attempt on tuplets/percent repeats
Date: Mon, 15 May 2006 16:54:28 +0200

On 5/15/06, Han-Wen Nienhuys <address@hidden> wrote:
Erik Sandberg schreef:
> Hi,
>
> Here's a patch that massively refactors tuplets and percent repeats.
>
> Highlights:
> - tuplets are now signalled by start/stop events.

This patch looks almost ready for inclusion. Can you address my
tuplet-event nit, verify that a clean make web still work, and commit?

The tuplet-engraver looks good, but I would still like the events to be
generated in the Tuplet_iterator (which you may rename from
time-scaled-music-iterator), so the music representation is analogous to
the

  \times 2/3

syntax.

ok, that's fine. Perhaps the music compression should be performed by
the iterator as well?

Keeping the music representation and syntax as closely related as
possible makes things easier, both for me (understanding the whole
thing), Nicolas (maintaining display-music) and you (when you want to
separate the parser and tree generation).

In general, I think it makes sense to move parser substitutions as much
as possible to the iterators, eg. at some point, we should also change
the implementation of mmrests, \clef and \time.

Is there a long-term plan to make iterators softcodable? The main
thing I dislike about moving stuff to iterators is that it moves code
to C++, so if someone wants to do a nonstandard tweak of
time_scaled_music_iterator, he has to recompile lily locally.

> - each percent/slash is signalled by an individual event, whose
> repeat-count property tells whether it should be numbered (this moves
> some decisions from engraver to iterator)

Huh, this doesn't correspond with your code, where countPercentRepeats
is still the determining factor? I'd like to leave countPercentRepeats
as is, btw.

the difference is the check for whether there are too few repeats to
bother about typesetting numbers (i.e., if there's only one percent)

> Some next steps that would be
> nice are:
> - move handling of double percent repeats to slash_engraver (or
> possibly to a new double_percent_engraver, but imho they are similar
> enough to share engraver)

Mabye even make a brand new engraver? WE have a lot of precomputations
that make adding another engraver rather cheap.

It does however require code duplication. Anyway, I'll apply the other
changes you requested, and then commit (the engraver can be split up
later)

BTW, what's your position on copyrights/licensing? I've added my name
to files which I feel I have modified massively, do you have
objections to that? (I'm ready to relicense any code I write to lgpl
or gpl>=3 if that's needed in the future)

Erik




reply via email to

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