Csound Csound-dev Csound-tekno Search About

[Cs-dev] (no subject)

Date2005-12-15 09:53
FromVictor Lazzarini
Subject[Cs-dev] (no subject)
from sebastian gustfeld about Cabel:
============================================
We are using the wrapper library for python to generate a CSD file. At
first we were also using this wrapper to start a csound thread (inspired
by Orbifold.py in the csound5/examples directory) but this made the GUI
nearly unresponsive with running csound thread.
================================================

I am a little worried that this has not worked for him. I was hoping that
the Python library could work as the sound engine for python applications.
If people will still have to run csound in a separate process, then all the
nice things that have been added to the API will not be used.

I suppose it could be a question of setting priorities for the threads, can 
that
be done in Python. The problem he reports does not seem to happen in
Java. Would it be the case for adding up a Python module (written in C)
that starts a thread for a given Csound instance (more or less as the csPlay
command in Tclcsound?), running csoundKsmps() in a loop?
That would have to be added by hand, I suppose, unless an API function is
added to do it (which perhaps is not really something to have in the API).

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth 



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-12-15 13:40
FromIstvan Varga
SubjectRe: [Cs-dev] (no subject)
AttachmentsNone  

Date2005-12-15 14:03
FromVictor Lazzarini
SubjectRe: [Cs-dev] (no subject)
what about calling csound::PerformKsmps() in a loop in the
csound thread? Would that allow the other threads to work in tandem?
In a single thread, could csoundYield() be used to give the GUI some
life?

Victor

At 13:40 15/12/2005, you wrote:
>Using threads in Python is somewhat limited, as there is a global
>interpreter lock that basically prevents other Python statements from
>being called while for example a Csound API function is used through
>the wrapper interface. This means that if you start Csound::Perform(),
>  the other threads will probably freeze until the entire score is
>performed (at least that is what I found while experimenting with the
>interface).

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth 



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net