<div dir="ltr"><div>I used to use pypm but it has become a bit of a pain (in my case, I also had to deploy on MacOSX which became almost impossible without jumping through hoops). So I found portmidizero (<a href="https://gitorious.org/portmidizero">https://gitorious.org/portmidizero</a>) which so far seems to be doing the job but I have not yet worked with it extensively. However, you cannot install it with easy-install as there are errors in setup.py (description repeated twice or something like that... grab the gitorious source, hack it and do setup.py install). pygame  seems like an overkill just for MIDI functionality...<br>

<br></div>Good luck.<br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">Michał</div></div>
<br><br><div class="gmail_quote">On Thu, Oct 3, 2013 at 12:31 PM, Atte <span dir="ltr"><<a href="mailto:atte@youmail.dk" target="_blank">atte@youmail.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi<br>
<br>
I'm working on some midi thing in python. I had a hard time finding a decent library. In the past I used PySeq alot, but that's tricky to install and seems un-maintained. So I settled for pygame, and it's going ok. However:<br>


<br>
1) In PySeq I created inports and outports that were visible for instance in qjackctl. Is that possible in pygame (currently I just connect to the right client from python)? Why would I prefer one over way over the other?<br>


<br>
2) If I unplug the connected client or press ctrl-c (my preferred way of exiting my programs) I get:<br>
<br>
PortMidi call failed...<br>
  PortMidi: `Bad pointer'<br>
type ENTER...<br>
<br>
How can I exit a pygame program cleanly without getting errors?<br>
<br>
3) One of the things I'd like to do I automatically connect to any client that shows up while the program is running and *gracefully handle it* if clients disappear while the program is running. I imagine the first is a matter of scanning for clients every now and then, but right now I get the error mentioned in 2) if I pull the plug on a device that my program is connected to. Any ideas how to handle this?<br>


<br>
Any feedback is greatly appreciated!<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Atte<br>
<br>
<a href="http://atte.dk" target="_blank">http://atte.dk</a>   <a href="http://modlys.dk" target="_blank">http://modlys.dk</a><br>
______________________________<u></u>_________________<br>
Linux-audio-user mailing list<br>
<a href="mailto:Linux-audio-user@lists.linuxaudio.org" target="_blank">Linux-audio-user@lists.<u></u>linuxaudio.org</a><br>
<a href="http://lists.linuxaudio.org/listinfo/linux-audio-user" target="_blank">http://lists.linuxaudio.org/<u></u>listinfo/linux-audio-user</a><br>
</font></span></blockquote></div><br></div>