[Top][All Lists]

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

Event streams

From: Michael Welsh Duggan
Subject: Event streams
Date: Thu, 21 Sep 2006 14:10:44 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

I am interested in the code necessary to output the event streams, as
in your Master's thesis.  I am looking at event streams with repect to
using them to help generate better MIDI output.  My naive attempt
(below) obviously does not work.

(Note, the following causes a segmentation fault.  Is this considered
the cost of doing business when playing around with guile embeddeds,
or should this be considered a bug?)

\version "2.9.19"

#(define (process-event event)
  (display event)

#(define (test music) 
  (let* ((odef (ly:make-output-def))
         (global (ly:make-global-context odef))
         (listener (ly:make-listener process-event))
         (global-disp (ly:context-events-below global))
         (disp (ly:make-dispatcher)))
   (ly:connect-dispatchers disp global-disp)
   (ly:add-listener listener disp 'StreamEvent)
   (ly:interpret-music-expression music global)))

#(test #{ <a b>4 << a \\ b >> #})


Michael Welsh Duggan

reply via email to

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