Csound Csound-dev Csound-tekno Search About

Updated Python examples for Csound 5

Date2005-12-04 02:58
From"Michael Gogins"
SubjectUpdated Python examples for Csound 5
I updated two of the Csound 5 Python scores, csound5/examples/koch.py and 
csound5/examples/Trapped.py, to use the "csnd" Python extension module, 
which should become part of the standard Csound distribution, instead of the 
"CsoundVST" Python extension module.

Trapped.py shows how to render Trapped in Convert by Richard Boulanger using 
the Python API. Both the orchestra file and the score file are embedded in 
the Python code.

koch.py shows to to algorithmically generate a score in Python, then render 
it using an embedded orchestra.

I also added more explanatory comments to the Python code.

I will continue to maintain the CsoundVST module, as it contains useful 
facilities for algorithmic composition, musical fractals, etc.

Regards,
Mike


Date2005-12-05 09:39
FromOeyvind Brandtsegg
Subjectre: [Cs-dev] Updated Python examples for Csound 5
Good.
for realtime, when calling csound.performKsmps(),
does it need an extra argument (compared to using it with csoundVST) ?

I get a message that performKsmps needs 2 arguments (1 given).
The 1 given is self.
I tried using csound.performKsmps(true) but got no further.

It seems like I can load csnd, and the orc/sco,
everything fine, except it does not perform any ksmps.
What should the argument to performKsmps be ?

Oeyvind



> From: Michael Gogins [gogins@pipeline.com]
> Sent: 2005-12-04 03:58:30 CET
> To: csound@lists.bath.ac.uk, csound-devel@lists.sourceforge.net
> Subject: [Cs-dev] Updated Python examples for Csound 5
> 
> I updated two of the Csound 5 Python scores, csound5/examples/koch.py and 
> csound5/examples/Trapped.py, to use the "csnd" Python extension module, 
> which should become part of the standard Csound distribution, instead of the 
> "CsoundVST" Python extension module.
> 
> Trapped.py shows how to render Trapped in Convert by Richard Boulanger using 
> the Python API. Both the orchestra file and the score file are embedded in 
> the Python code.
> 
> koch.py shows to to algorithmically generate a score in Python, then render 
> it using an embedded orchestra.
> 
> I also added more explanatory comments to the Python code.
> 
> I will continue to maintain the CsoundVST module, as it contains useful 
> facilities for algorithmic composition, musical fractals, etc.
> 
> Regards,
> Mike
> 
> 
> 
> 
> 
> -------------------------------------------------------
> 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
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 

Date2005-12-05 13:36
FromIstvan Varga
SubjectRe: [Cs-dev] Updated Python examples for Csound 5
AttachmentsNone  

Date2005-12-05 14:52
FromOeyvind Brandtsegg
Subjectre: [Cs-dev] Updated Python examples for Csound 5
Using either csound.performKsmps(true), or csound.PerformKsmps works as expected up to a certain point for me.
Csound loads fine as usual,
and the loop where performKsmps resides does run (I stuck a print 'running' in there and it prints repeatedly...)
but when I send an event to csound, using csound.inputMessage,
the performKsmps loop seems to halt (stops printing), and Python exits with "This application has requested the Runtime to terminate it in an unusual way....."
Should I use something else than csound.inputMessage() to send realtime events to csound ?





> From: Istvan Varga [istvan_v@fibermail.hu]
> Sent: 2005-12-05 14:36:48 CET
> To: csound-devel@lists.sourceforge.net
> Subject: Re: [Cs-dev] Updated Python examples for Csound 5
> 
> On Monday 05 December 2005 10:39, Oeyvind Brandtsegg wrote:
> 
> > Good.
> > for realtime, when calling csound.performKsmps(),
> > does it need an extra argument (compared to using it with csoundVST) ?
> >
> > I get a message that performKsmps needs 2 arguments (1 given).
> > The 1 given is self.
> > I tried using csound.performKsmps(true) but got no further.
> >
> > It seems like I can load csnd, and the orc/sco,
> > everything fine, except it does not perform any ksmps.
> > What should the argument to performKsmps be ?
> 
> The extra argument is the 'absolute' boolean value, which, if true,
> will result in performing even after the end of the score. Also, you
> may try calling PerformKsmps() instead of performKsmps().
> 
> 
> -------------------------------------------------------
> 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
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 

Date2005-12-05 15:16
FromIstvan Varga
SubjectRe: [Cs-dev] Updated Python examples for Csound 5
AttachmentsNone