[CM] CM, rt, portmidi osx, linux

andersvi@extern.uio.no andersvi@extern.uio.no
Mon, 13 Feb 2006 12:15:39 +0100


>>> "F" == Fernando Lopez-Lezcano <nando@ccrma.Stanford.EDU> writes:
>> However,
>> 
>> > (define *pm* (portmidi-open :input 12 :output 11 :latency 0))
>> 
>> > (set-receiver! #'(lambda (mm ms) mm (print ms)) *pm*)
>> 
>> and playing my virtual keyboard here crashes cmucl, and hits an
>> error in sbcl.
>> 
>> If someone has this working on a linux machine with portmidi,
>> would they be kind enought to post some info about versions of
>> lisp/CM/portmidi?
F> 
F> I'm using sbcl 0.9.7 (with thread support) with a cm cvs snapshot dated
F> 2005.12.15 (I think) and receving seems to work. What kind of error are
F> you getting in sbcl? 

Heres a session from a shell.  Setting it up:

 * (pm::getdeviceinfo)

 ((:ID 0 :NAME "Midi Through Port-0" :TYPE :OUTPUT :OPEN NIL)
  (:ID 1 :NAME "Midi Through Port-0" :TYPE :INPUT :OPEN NIL)
  (:ID 2 :NAME "VirMIDI 1-0" :TYPE :OUTPUT :OPEN NIL)
  (:ID 3 :NAME "VirMIDI 1-0" :TYPE :INPUT :OPEN NIL)
  (:ID 4 :NAME "VirMIDI 1-1" :TYPE :OUTPUT :OPEN NIL)
  (:ID 5 :NAME "VirMIDI 1-1" :TYPE :INPUT :OPEN NIL)
  (:ID 6 :NAME "VirMIDI 1-2" :TYPE :OUTPUT :OPEN NIL)
  (:ID 7 :NAME "VirMIDI 1-2" :TYPE :INPUT :OPEN NIL)
  (:ID 8 :NAME "VirMIDI 1-3" :TYPE :OUTPUT :OPEN NIL)
  (:ID 9 :NAME "VirMIDI 1-3" :TYPE :INPUT :OPEN NIL)
  (:ID 10 :NAME "qjackctl" :TYPE :OUTPUT :OPEN NIL)
  (:ID 11 :NAME "Synth input port (417:0)" :TYPE :OUTPUT :OPEN NIL)
  (:ID 12 :NAME "Virtual Keyboard" :TYPE :INPUT :OPEN NIL))
 * (define *pm*
   (portmidi-open :input 12 :output 11 :latency 0))

 * *pm*

 #<portmidi-stream "midi-port.pm" (in:12 out:11)>
 * (set-receiver! #'(lambda (mm ms) mm (print ms)) *pm*)


And heres what happens when hitting a key on the virtual
keyboard:


 * 
 debugger invoked on a UNBOUND-VARIABLE in thread
 #<THREAD "initial thread" {A681319}>:
   The variable PORTMIDI::PM-MESSAGE is unbound.

 Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

 restarts (invokable by number or by possibly-abbreviated name):
   0: [ABORT] Exit debugger, returning to top level.

 (PORTMIDI:EVENT.MESSAGE #.(SB-SYS:INT-SAP #X0818D5B0) NIL)
 0]