lilypond-devel
[Top][All Lists]
Advanced

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

Re: implementation plan for music streams


From: Han-Wen Nienhuys
Subject: Re: implementation plan for music streams
Date: Thu, 11 May 2006 00:54:57 +0200



2006/5/10, Erik Sandberg <address@hidden>:
Citerar Han-Wen Nienhuys <address@hidden>:

> > Known issue: unfold-repeats will probably not work for percent repeats.
> (the
> > repeat will be unfolded, but percents will still remain). I'd suggest to
> fix
> > this by scrapping percent-repeat-iterator, and to create a SequentialMusic
> of
> > percent-repeat-events instead. So
> > \repeat percent 4 c4
> > =>
> > {c4 <pre> <pre> <pre> }
> > where <pre> is a percent-repeat-event. This requires that
> > percent-repeat-engraver and slash-repeat-engraver are changed (simplified)
> as
> > well.
>
> I don't understand this. unfold-repeats is on the front end, we can just
> make it replace PercentRepeatMusic with UnfoldedRepeatMusic wholly; that
> should work, right?

I implemented percent repeats in a way similar to tuplet brackets, i.e. by
sending a parallel event. One reason for this decision is that the EventChord
iterator is where events are supposed to be reported.


Yes, and that's what I disagree with. I agree you need to put in events for signaling information, but I oppose to inserting them in the parser. Can you change the code to make the iterators generate those events on the fly.

If you do it in this way, the problem with unfolded percent repeats is trivially fixed.

> > I don't understand. Why don't you send TupletSpanEvents (START, STOP)
> from the iterator? If you do that, you might even be able to scrap a lot
> of the hairy timekeeping logic in the engraver.

The nice thing about my solution is that time-scaled-music-iterator can be
scrapped altogether. This could also be achieved with start/stop events by
expanding \times <mus> to
{ TupletSpanStartEvent <mus> TupletSpanStopEvent }
but I guess there would be problems with nested tuplets (how to pair START and
STOP events?)

start and stop events are nested, just like parentheses. A stop stops the most recently started one.

--
Han-Wen Nienhuys
address@hidden
http://www.xs4all.nl/~hanwen
reply via email to

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