[LAU] midi in python, 2 pygame.midi questions

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Atte <atte@...>
To: <linux-audio-user@...>
Date: Thursday, October 3, 2013 - 4:32 pm


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:

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?

2) If I unplug the connected client or press ctrl-c (my preferred way of
exiting my programs) I get:

PortMidi call failed...
PortMidi: `Bad pointer'
type ENTER...

How can I exit a pygame program cleanly without getting errors?

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?

Any feedback is greatly appreciated!


http://atte.dk http://modlys.dk
Linux-audio-user mailing list

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAU] midi in python, 2 pygame.midi questions, Atte, (Thu Oct 3, 4:32 pm)
Re: [LAU] midi in python, 2 pygame.midi questions, Michal Seta, (Fri Oct 4, 10:07 pm)