lilypond-devel
[Top][All Lists]
Advanced

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

Re: Implementation of music streams


From: Han-Wen Nienhuys
Subject: Re: Implementation of music streams
Date: Mon, 15 May 2006 18:26:43 +0200
User-agent: Thunderbird 1.5.0.2 (X11/20060501)

Erik Sandberg schreef:
However, I have found one good alternative, where the stream event has
no unique field. This approach involves a dummy event
"AnnounceContext", which are sent by newly created contexts. These
messages have no musical meaning, and should not be part of any output
file, but you must listen to them if you want to find out about the
context structure.

I'd suggest that an AnnounceContext event contains a direct reference
to the newly created context, as well as a direct reference to the
CreateContext event. This makes it very clear which CreateContext
events that result in which contexts.

I like my new design better than my original one, because data is
separated in a more logical way, and because I think it eliminates a
bad hack in create_context.

It sounds better, but I'm still not following you completely. Why can't you connect the StreamEvents to the appropriate context in the stream reader? Ie. why does it need the intervention of (dummy) events?

--

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

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com





reply via email to

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