Csound Csound-dev Csound-tekno Search About

[Cs-dev] Csound threading with wxPython

Date2006-11-20 15:04
FromMichael Gogins
Subject[Cs-dev] Csound threading with wxPython
I have been experimenting with using wxPython to make realtime Csound 5 applications.

In general, things work very well, but I noticed something very curious and I wonder if anyone has an explanation.

In order to use csnd.CsoundPerformanceThread in a wxPython event handler, e.g. to handle clicking on a "Play" button, it is necessary to first launch a regular Python thread, and then in the regular Python thread, call CsoundPerformanceThread.Play to launch the actual Csound performance. Skipping the regular Python thread just doesn't work. For an example, see examples/wxController.py in CVS.

Does anyone know why this two-stage thread launching is necessary?

Anyway, as I said, things work quite well and I am developing a feeling that quite elaborate and responsive GUIs can be created this way. 

I have also found that Boa Constructor saves a lot of work and can produce a very finished (indeed, professional quality) GUI in Python. Does anyone know of a comparable GUI builder for Tkinter? That would be very useful since the generated GUIs would work right out of the box with Csound 5 on any computer with Python installed.

Regards,
Mike



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-11-20 22:44
FromDavid Worrall
SubjectRe: [Cs-dev] Csound threading with wxPython
Hi Mike,
I'm a  fair bit behind you, but I'm pointed in the same direction.
Have you read the section on multithreading in Rappin & Dunn's  
"wxPython in Action"?

Also, I'd be interested to know whether you've compared Boa with  
PythonCard (or even wxGlade) for producing GUIs

ciao,

David

On 21/11/2006, at 2:04 AM, Michael Gogins wrote:

> I have been experimenting with using wxPython to make realtime  
> Csound 5 applications.
>
> In general, things work very well, but I noticed something very  
> curious and I wonder if anyone has an explanation.
>
> In order to use csnd.CsoundPerformanceThread in a wxPython event  
> handler, e.g. to handle clicking on a "Play" button, it is  
> necessary to first launch a regular Python thread, and then in the  
> regular Python thread, call CsoundPerformanceThread.Play to launch  
> the actual Csound performance. Skipping the regular Python thread  
> just doesn't work. For an example, see examples/wxController.py in  
> CVS.
>
> Does anyone know why this two-stage thread launching is necessary?
>
> Anyway, as I said, things work quite well and I am developing a  
> feeling that quite elaborate and responsive GUIs can be created  
> this way.
>
> I have also found that Boa Constructor saves a lot of work and can  
> produce a very finished (indeed, professional quality) GUI in  
> Python. Does anyone know of a comparable GUI builder for Tkinter?  
> That would be very useful since the generated GUIs would work right  
> out of the box with Csound 5 on any computer with Python installed.
>
> Regards,
> Mike
>
>
>
> ---------------------------------------------------------------------- 
> ---
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to  
> share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php? 
> page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

_______________________________________
experimental polymedia:	www.avatar.com.au
Sonic Communications Research Group,
University of Canberra:	 www.canberra.edu.au





-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net