Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] csound5gui Error

Date2006-05-07 17:37
FromIstvan Varga
SubjectRe: [Cs-dev] csound5gui Error
AttachmentsNone  

Date2006-05-07 18:07
FromMichael Gogins
SubjectRe: [Cs-dev] csound5gui Error
Good question.

What I want is for the user to be able to click on the "perform" button in csound5gui and have the Python library loaded by csound5gui execute the script whose filename is in the scriptFileNameInput text box. 

The Python script itself will call compile and perform. The csound5gui program will not do that when running scripts. However, the csound5gui program has extracted a pointer to the CppSound  object that the csnd module automatically creates when it is imported, extracted the CSOUND pointer from that CppSound object, and is now using that pointer in place of the one that was created when csound5gui starts up. Therefore, the message callbacks, performance time calls, and so on should work. In other words, when Python runs csound.perform(), the score time text field on the csound5gui main window will update as it should.

I realized, after thinking about it, that I need to create another variant on the CsoundPerformance class, named Python Performance, which will encapsulate what needs to be done. 

I believe the problems I was having relate to executing the Python script synchronously and therefore ceasing to dispatch FLTK events. I think running the Csound performance in a separate thread (which is CsoundVST does)
will take care of this. There may still be issues with FLTK locking.

Regards,
Mike

-----Original Message-----
>From: Istvan Varga 
>Sent: May 7, 2006 9:55 AM
>To: csound-devel@lists.sourceforge.net
>Subject: Re: [Cs-dev] csound5gui Error
>
>On Saturday 06 May 2006 21:33, Michael Gogins wrote:
>
>> I'm having problems getting the Python to actually work. No problem
>> loading Python and calling the Python API dynamically. The problem
>> comes when actually running Python scripts. Code that works in CsoundVST
>> doesn't work in csound5gui. Probably the threading or message callback
>> stuff is too different.
>> 
>> At this point, we can fix this or just revert to csound5gui without
>> Python. I'm happy either way, I'd like to know what others think.
>
>How is running an external script to control performance intended to
>work ? It would be interesting to see a simple example.
>If getting the Python scripting to work before 5.02 (there may be 4 or
>maybe 5 days before tagging the sources, if the originally intended
>release date of May 15 does not change), then it could be done in
>5.03, and for now the already working parts could be kept.
>
>
>-------------------------------------------------------
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job easier
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel





-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net