[CM] Receiving from portmidi

Thomas Lambert thomaslambert@altern.org
Tue, 1 May 2007 11:59:50 +0200 (CEST)


Ok i really am in 2.11.0 and receiving won't work.

You can really see that portmidi-open is starting the receive :

CM> (receiver? *pm*)
NIL
CM> (define *pm* (portmidi-open :latency 0 :input 6))
; No value
CM> (receiver? *pm*)
T

In pm.scm (revision 1.47), i can seen that portmidi-open calls
rt-stream-receive-data via open-io, right after Pm:OpenInput. So again it
seems designed to behave that way.

Could someone test example 3 from portmidi topic
(http://commonmusic.sourceforge.net/doc/dict/portmidi-topic.html) ? You
don't really need incoming data, a quick copy-paste with corresponding
input pm id will be enough to know if the problem comes from my setup.

Cause I know must be missing something but I'm running out of leads.


> Hello common music people,
>
> Here's the big picture : I can't receive any midi events, sending seem to
> be working and i'd really appreciate some help.
>
> I'm really looking forward to a working setup, i already read Notes From
> The Metalevel and am on the starting block.
>
> I'm using last stable cffi 0.9.2
> sbcl 1:1.0.0.0-1
> last ubuntu linux feisty fawn (with bash)
>
> I first thought this problem might come from a too old portmidi but i have
> now the libportmidi from sources (thanks rick ! -> i also found a cvs
> makefile on the cmdist mailing list
> http://ccrma-mail.stanford.edu/pipermail/cmdist/2005-December/002855.html)
>
> Many problems were solved by using cvs rather than stable releases of CM
> so now i only use cvs (portmidi interface, cm and rts)
>
> rts and portmidi loads quite well
>
> I'm running in a Terminal to ease the debug.
>
> * (cm-version)
> "Common Music 2.10.0"
> (With last cvs shouldn't it be 2.11.0 ?)
>
> I try the rts' topic example 3, when evaluating set-receiver! i have the
> following error :
>
> debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread"
> {A82F5D1}>:
>   set-receiver!: #<portmidi-stream "midi-port.pm" (in:6 out:4)> already
> receiving.
>
> So i uncommented the portmidi-record! code to be able to test the third
> example of portmidi topic :
>
> debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread"
> {A82F5D1}>:
>   portmidi-record!: receiver already active.
>
> It seems that CM is receiving as soon as the portmidi-open fonction is
> used.
> I checked the code of set-receiver but the problem wasn't obvious to me
>
> Maybe this is all normal but then how do i store received data to a Seq ?
>
> Thanks,
>
> Thomas
>
> _______________________________________________
> Cmdist mailing list
> Cmdist@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
>
> !DSPAM:46351ebe201411217419413!
>
>
>