[CM] MidiShare error with CM

Rick Taube taube@uiuc.edu
Sun, 11 Dec 2005 20:58:57 -0600


>
> Umm, is that how it's supposed to behave ?

i think this is a CMUCL/SBCL issue with output to the terminal from a 
different thread.
try adding a (force-output) after the print, ie doing something like:

(set-receiver! (lambda (ev)
                  (ms:MidiPrintEv ev)
                  (force-output)
                  (ms:MidiFreeEv ev))    ; dont forget to free an ev if 
you dont resend!
                *ms*)




On Dec 11, 2005, at 9:08 PM, Dave Phillips wrote:

> Rick Taube wrote:
>
>>> Error in function NULLPTRP:
>>>   Attempt to call (NULLPTRP #.(SYSTEM:INT-SAP #x080A94A4)) without 
>>> MIDISHARE loaded.
>>> Error flushed ...
>>
>>
>>
>> thank you for testing! nullptrp things are fixed in CVS as of today 
>> and are available either by cvs (checkout midishare)
>> or by installing midishare-1.0.1.tar.gz
>
> Cool, I just checked it out. Example 3 now avoids the error above when 
> I play the virtual MIDI keyboard, but nothing appears in CM. However, 
> when I remove the receiver here's what happens:
>
> * (set-receiver! (lambda (ev) (ms:MidiPrintEv ev)) *ms*)
>
> ;;; I bang on the keyboard for a while...
>
> * (remove-receiver! *ms*)
> #<MidiEv KeyOn [0/0 12741806ms] 55 127>#<MidiEv KeyOff [0/0 
> 12742030ms]>#<MidiEv
> KeyOn [0/0 12745654ms] 61 127>#<MidiEv KeyOff [0/0 
> 12745814ms]>#<MidiEv KeyOn [
> 0/0 12746782ms] 71 127>#<MidiEv KeyOff [0/0 12746942ms]>#<MidiEv KeyOn 
> [0/0 1274
> 7478ms] 77 127>#<MidiEv KeyOff [0/0 12747646ms]>#<MidiEv KeyOn [0/0 
> 12751478ms]
> 59 127>#<MidiEv KeyOff [0/0 12751654ms]>#<MidiEv KeyOn [0/0 
> 12752486ms] 64 127>#
> <MidiEv KeyOff [0/0 12752638ms]>#<MidiEv KeyOn [0/0 12753006ms] 74 
> 127>#<MidiEv
> KeyOff [0/0 12753182ms]>#<MidiEv KeyOn [0/0 12770582ms] 58 
> 127>#<MidiEv KeyOff [
> 0/0 12770789ms]>#<MidiEv KeyOn [0/0 12771494ms] 65 127>#<MidiEv KeyOff 
> [0/0 1277
> 1621ms]>#<MidiEv KeyOn [0/0 12771822ms] 72 127>#<MidiEv KeyOff [0/0 
> 12771989ms]>
> #<MidiEv KeyOn [0/0 12772374ms] 65 127>#<MidiEv KeyOff [0/0 
> 12772509ms]>#<MidiEv
> KeyOn [0/0 12772974ms] 59 127>#<MidiEv KeyOff [0/0 
> 12773181ms]>#<MidiEv KeyOn [
> 0/0 12773798ms] 55 127>#<MidiEv KeyOff [0/0 12773918ms]>#<MidiEv KeyOn 
> [0/0 1277
> 4078ms] 52 127>#<MidiEv KeyOff [0/0 12774245ms]>#<MidiEv KeyOn [0/0 
> 12774590ms]
> 56 127>#<MidiEv KeyOff [0/0 12774782ms]>#<MidiEv KeyOn [0/0 
> 12775094ms] 59 127>#
> <MidiEv KeyOff [0/0 12775301ms]>#<MidiEv KeyOn [0/0 12775814ms] 65 
> 127>#<MidiEv
> KeyOff [0/0 12775917ms]>#<MidiEv KeyOn [0/0 12776118ms] 73 
> 127>#<MidiEv KeyOff [
> 0/0 12776285ms]>#<MidiEv KeyOn [0/0 12776638ms] 72 127>#<MidiEv KeyOff 
> [0/0 1277
> 6773ms]>#<MidiEv KeyOn [0/0 12777126ms] 70 127>#<MidiEv KeyOff [0/0 
> 12777309ms]>
> #<MidiEv KeyOn [0/0 12777790ms] 68 127>#<MidiEv KeyOff [0/0 
> 12777910ms]>#<MidiEv
> KeyOn [0/0 12778030ms] 66 127>#<MidiEv KeyOff [0/0 
> 12778166ms]>#<MidiEv KeyOn [
> 0/0 12778486ms] 64 127>#<MidiEv KeyOff [0/0 12778677ms]>#<MidiEv KeyOn 
> [0/0 1278
> 5725ms] 65 127>#<MidiEv KeyOff [0/0 12785845ms]>#<MidiEv KeyOn [0/0 
> 12788973ms]
> 73 127>#<MidiEv KeyOff [0/0 12789125ms]>#<MidiEv KeyOn [0/0 
> 12793565ms] 74 127>#
> <MidiEv KeyOff [0/0 12793677ms]>
> *
>
> Umm, is that how it's supposed to behave ?
>
> Best,
>
> dp
>