lilypond-devel
[Top][All Lists]
Advanced

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

Re: music events vs stream events


From: Han-Wen Nienhuys
Subject: Re: music events vs stream events
Date: Mon, 29 May 2006 13:30:27 +0200
User-agent: Thunderbird 1.5.0.2 (X11/20060501)

[ccing list for general education]

Erik Sandberg schreef:
On 5/29/06, Han-Wen Nienhuys <address@hidden> wrote:

Erik Sandberg schreef:
> One way to achieve this change would be to provide a music type Event, which
> wraps around a stream event and reports it, and to let the elements of
> EventChord be a list of stream events instead of music (which of course means > that EventChord's 'elements will be renamed to 'events or similar). This > change would make it more clear that the iteration process is the process of
> assigning stream events to contexts.

This sounds very good, but I'm worrying about chord syntax, eg.

   <c-\tag #'bla -. >

where NoteEvents have Event children (which again may nest). Does that
cause problems in a model where Events and StreamEvents are merged, and
different from Music?

That phenomenon already exists (a stream event can contain nested
music sometimes). With the new design, the StreamEvents will instead
contain other StreamEvents, so AFAICS the badness is unchanged from
the current state (and still, no event is ever sent twice). BTW, I
don't think there are any technical problems with nested events, only
philosophical/pedagogical problems (e.g.: is the music stream a
suitable format in general for music representation?)

OK, solved then. I think conceptually it's not a problem that StreamEvents are nested, as long as they don't introduce 'subtiming', eg. Simultaneous and Sequential constructs. Then we can keep the timing related headaches in the Iterator part.

Your example does however illustrate a different problem: There will
have to be some kind of distinction between music functions that
return music and stream events, respectively. One way could be to let
the parser do event->music type conversion implicitly when needed (so
it would be OK for music functions to return stream events where music
is expected, but not the other way around).

I'm not sure if we can pull this off, but in that case we can simply introduce another function type, i.e. event-functions.

Sounds good; go for it!

--

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]