[CM] bringing midifiles into CM
Drew Krause
drkrause at mindspring.com
Sun Oct 17 09:25:58 PDT 2004
I'm writing the following CM function, which lists the keynums,
start-times and durations for each event in a midi file. The keynums and
durations work fine, but what should #'mystery-value be -- or how must
start-times otherwise be handled? All help much appreciated!
Thanks,
Drew Krause
(defun midi-in (midifile)
(let ((mytracks (import-events midifile :meta-exclude t))
(pits '())
(durs '())
(starts '()))
(map-subobjects #'(lambda (x) (push x pits)) mytracks :key
#'midi-keynum :type 'midi)
(map-subobjects #'(lambda (x) (push x durs)) mytracks :key
#'midi-duration :type 'midi)
(map-subobjects #'(lambda (x) (push x starts)) mytracks :key
#'mystery-value :type 'midi)
(list (nreverse pits) (nreverse starts) (nreverse durs))))
More information about the Cmdist
mailing list