[CM] Parsing MIDI files with CM

David Kamp david.kamp@gmx.de
Sun, 3 Jun 2007 08:11:32 -0700 (PDT)


Hi.
I am trying desperately to import midi events to lists but all examples in
CM dictionary and the various ways of doing it mentioned in mails on this
list (as well as the one quoted below) dont seem to work for me. I am
working in guile and all i get  is an empty list. Does this work differently
in guile than in regular lisp? 
I want to collect keynums durations and amplitudes of a midifile in a list,
modify them and spit them back out, just like you wrote below.

thanks a lot.



Rick Taube wrote:
> 
> 
> to collect lists of things, you map the objects rather than a slot and 
> return what you want:
> 
> 	(fold-objects (lambda (x l) (cons (list (sv x :time) (sv x :keynum)) 
> l)) s1 '() :class 'midi)
> 
> 	=> ((18.0 77) (17.875 77) (17.75 77) (17.75 89) (17.625 75) (17.625 
> 86) ...)
> 
> 

-- 
View this message in context: http://www.nabble.com/Parsing-MIDI-files-with-CM-tf1295004.html#a10937463
Sent from the CCRMA - CMdist mailing list archive at Nabble.com.