[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Pygame + Jack?



Unfortunately, that won't work.  I asked on the SDL mailing list about the jack backend, but unfortunately the patch was never finished.  Here is the old email thread where someone has their SDL+jack patch.    http://forums.libsdl.org/viewtopic.php?t=5682&sid=5f22dd6ed373f5d4ef4d11562553aad7  I'll ask more about jack with SDL again on the mailing list.



I think the easiest way for the moment would be to route it through alsa.
  http://jackaudio.org/routing_alsa

  Here is the jack plugin for alsa...
    http://alsa.opensrc.org/Jack_%28plugin%29



Have you tried changing the to use key down event?  Since there is latency from when you hit the key, and finally release it (when the key up event appears).




On Fri, Feb 18, 2011 at 10:51 PM, Brian Gryder <bgryderclock@xxxxxxxxx> wrote:
Thank you all for the replies,

I verified there was no empty space on the ends of the sound file and reduced the buffer size.  René, that is a great tutorial on midi and jack. I was able to get midi connectivity with the pygame.midi functions.

i found this example of C code that uses jack:
http://trac.jackaudio.org/browser/trunk/jack/example-clients/metro.c

Is it possible to download the source files like  "jack.h" and "transport.h" in the pygame file's folder then somehow import it and call a function to make my program appear the in

qjackctl dialog boxes? Thank you.





On Wed, Feb 16, 2011 at 2:43 PM, Greg Ewing <greg.ewing@xxxxxxxxxxxxxxxx> wrote:
Brian Gryder wrote:
I wrote this simple drum pad program with pygame and the lag between key presses and the start of the sound bugs me.

Have you tried reducing the size of the sound buffer?
Too large a buffer seems to be a known cause of latency
when using the pygame mixer.

--
Greg