[CM] Sbcl and realtime cm

Rick Taube taube@uiuc.edu
Fri, 6 Oct 2006 11:58:43 -0500

i just ran some short tests of rts and portmidi on my linux box:
	planet ccrma
	sbcl 0.9.10
	cffi 0.9.1

and portmidi input works and the timing of algos seems very solid.  i  
have checked in CM's portmidi sources  that has setchannelmask  
commented out because its missing in the latest portmidi sources.  
(ill add this back in when roger makes another release of portmdi).  
it will take several hours for the sources to migrate to cvs, look  
for rev. 1.3 of cff-portmidi.lisp (new sources
so i will now try testing in your version of sbcl to see if i can  
duplicate your problems.

this is what i am using to test

(in-package cm)

(progn (use-system :rts)
        (use-system :portmidi)
        (defun simp (num rhy key wid)
          (process for i below num
                   output (new midi :time (now)
                               :keynum (between key (+ wid key))
                               :amplitude .7)
                   wait rhy))

(pprint (pm:getdeviceinfo))

;; fix port numbers for your setup.
(defparameter pm (portmidi-open :input 0 :output 1))

;;; output test

(rts pm)

;; eval this multiple times to test output
(sprout (simp (pick 8 12 16) .1 (between 50 70) 12))

;;; input -> output test.

(recv pm)
(recv-set! pm
            (lambda (m)
              (if (note-on-p m)
                  (sprout (simp (pick 8 12 16) .1 (note-on-key m)  

;; now play keyboard, each key down triggers new algo

(recv-stop pm)