lilypond-devel
[Top][All Lists]
Advanced

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

Re: Part Combiner


From: Han-Wen Nienhuys
Subject: Re: Part Combiner
Date: Mon, 29 Aug 2005 23:51:06 +0200
User-agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720)

Kristof Bastiaensen wrote:
I am not sure if I could do something about this.  Perhaps I could
refactor the code a bit to make it clearer to understand.  Especially
the final part is too complicated.  I am considering if some kind of a
pattern-matcher could simplify the whole thing.

If there are comments that don't make sense, I would gladly modify
them.

To me, the new code reads like a long list of small function definitions. It's difficult to tell how the different parts are related.

In addition, the whole design of the part-combiner will be trashed
anyway when we have sensible music stream datastructures (see the
mail in lilypond-devel by Erik S)



That looks interesting.  The music-stream datastructure looks to me
like an AST (Abstract Syntax Tree) for a compiler.  Many functional
languages (Haskell, Ocaml, SML) are based on such datatypes, and their
type-system makes handling such AST's especially easy, together with
other features like pattern-matching on types.

Yes, but it's not. You should rather think of a MIDI file, but

 - with rational numbers iso. ticks
 - with events suitable for typesetting
 - without arbitrary limits.

It doesn't have as far as I know (as much as that is possible to say
about new code).  The regression tests that came with the previous
part-combiner will not work anymore, but that is deliberatly.  My
part-combiner only makes changes (from and to solo, a due, ...) for
larger blocks (with a rather complicated algorithm to determine the
beginning and end of blocks).  That is to prevent to many changes from
happening in a short time, making the score more cluttered and less
readable.  The regression tests are all small fragments, and my
part-combiner will likely put the whole fragment apart, a due or solo.

But the thresholds can be tuned, no? For the regtest, you could tune them down, so we can still verify whether everything works.

Also, it would be helpful if we could have the new and current partcombiner together for a couple of release so we can see the differences, and get some feedback.


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




reply via email to

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