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: Erik Sandberg
Subject: Re: implementation plan for music streams
Date: Tue, 4 Apr 2006 22:19:14 +0200
User-agent: KMail/1.8.3

On Tuesday 04 April 2006 21.37, Han-Wen Nienhuys wrote:
> Erik Sandberg wrote:
> > On Tuesday 04 April 2006 20.46, Han-Wen Nienhuys wrote:
> >> Han-Wen Nienhuys wrote:
> >>> I'd start with 4. because they're independent from the rest, and we can
> >>> readily test the rest of those.
> >
> > The reason for my ordering, is that 3 can be used to verify that 4 works.
> >
> > BTW, (1-3) are completely independent of (4), and I have just finished
> > step (1) locally. If you insist on getting (4) done before (1), then
> > that's perfectly OK with me; but is it OK for you to look at my patch for
> > (1) while I do (4)? I guess (1) is the step which requires the longest
> > discussion, so it might be good to start the discussion early.
>
> If you have a working patch, let's see it.

It's just a bunch of new files; all are attached.

Some known issues:
- scm/define-event-classes.scm contains rather unsorted functions which are 
related to music streams. Most of them are probably in the wrong place. I 
guess simplify-scheme should be in music-functions.scm, but where should I 
place car< ?
- The Stream_event class duplicates its 'context property with a context_ 
member; this was originally intended to give speedups, but it is broken in 
this version and requires some modifications to Context in order to work. 
I'll probably remove the context_ member altogether in the next revision.

The dispatcher system has been tested with the following code:

#(begin
; event -> disp -> list
  (define disp (ly:make-dispatcher))
  (define list (ly:make-listener (lambda (ev) (display "received: \"") 
(display ev) (display "\"\n"))))
  (define ev (ly:make-stream-event '((class . StreamEvent) (id . 2) (foo . 
"bar"))))
  (ly:add-listener list disp 'StreamEvent)
  (ly:broadcast disp ev)

; ev -> disp2 -> disp -> list
  (define disp2 (ly:make-dispatcher))
  (ly:connect-dispatchers disp disp2)
  (ly:broadcast disp2 ev)
)

-- 
Erik

Attachment: dispatcher.cc
Description: Text Data

Attachment: listener-scheme.cc
Description: Text Data

Attachment: listener.cc
Description: Text Data

Attachment: stream-event.cc
Description: Text Data

Attachment: dispatcher.hh
Description: Text Data

Attachment: listener.hh
Description: Text Data

Attachment: stream-event.hh
Description: Text Data


reply via email to

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