Han-Wen Nienhuys <[EMAIL PROTECTED]> writes:
> I still think that should be *no* separate Chord object.
>
> Why?
>
> Simple: if a chord is constructed as a set of notes, you automatically
> can print out the chords (as notes), play them in MIDI and transpose
> them. If you put stuff inside Chord objects, you have to duplicate
> code to get printing, playing, and transforming right. I won't have
> duplicate code in Lily.
True. However, I don't think that playing the chords or displaying
them is very useful anyway. Do play it, you would need something more
sophisticated than a piano banging the notes once for eatch chord.
And for display it's even less useful. But for "debugging" purposes
it can be useful.
As for transposing, if the chords are stored as a chord object, only
the tonic needs to be transposed, as the other notes should be stored
relative to that.
An interesting, but hard-to-do, project would be to do a midi engraver
that creates an accompaniment, like band-in-a-box.
> If you think you can do it without substantial code duplication, then
> show me the code that does so.
I'm digging through the source and trying to understand them. First
of all I'm trying to find the bugs that prevent me from using lilypond
for anything else than very small scores. I'll soon send a bug report
to see if anybody else can see what's happening.
--
David Kågedal