[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: Python suitable for Midi ?
From:       "Chuckk Hubbard" <badmuthahubbard () gmail ! com>
Date:       2008-10-31 10:04:08
Message-ID: 8200bab70810310304u5f81b535n617ddcf451a7e45a () mail ! gmail ! com
[Download RAW message or body]

On Tue, Oct 28, 2008 at 7:13 PM, Derek Martin <code@pizzashack.org> wrote:
> On Tue, Oct 28, 2008 at 06:54:57PM +0200, Chuckk Hubbard wrote:
>> The problem I've run into is that I can't set the audio to a higher
>> priority than the GUI (Tkinter).  If I move the mouse over the app, no
>> matter what, I get audio dropouts.  AFAICT this is the same for all
>> Python, regardless of what modules one uses: you can't assign system
>> priorities to different threads.  If you're planning to pipe MIDI to
>> another app for playback, maybe it won't be an issue for you.
>
> FWIW...  You could take your own advice, and devide your application
> in two: one process manages the GUI, and the second is a back-end
> process that plays the MIDI.  Your GUI can even launch the back end,
> which will inherit the priority of the GUI, after which the GUI can
> reduce its own priority (the priority of the back end will not be
> affected by the change)...

Thanks, Derek!  It took me some looking and experimenting, but this is
a great idea.  I see now that os.nice() works for Mac too, and Gabriel
has some suggestions for Windows.  So simple- I was thinking I needed
superuser access to set priority to real-time, but I don't need it to
raise the priority of a running process.  I never would have thought
of that on my own.

-Chuckk


-- 
http://www.badmuthahubbard.com
--
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic