Python and Csound

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Python and Csound

JL Diaz
Hello, Csounders,

Recently, I started learning Python, and I was interested in the possibility of using Python to algorithmically generate scores for Csound. I recalled to have read something about it, so I googled a bit, and found:
  • pmask (http://web.tiscali.it/mupuxeddu/csound/) It is a python implementation of Cmask. However, the page was not updated since 2000, so I guess that it is an abanoned branch, apparently superseeded by:
  • omde/pmask (http://pythonsound.sourceforge.net) This one appears to be a more serious attempt of integration between python and csound. However, the current release is marked "beta", and it is from 2001. The documentation is incomplete. Another dead way?
  • Silence. http://www.csounds.com/gogins/silence/. Updated on May 2003, according to the description and screenshots, this is the most promising option. However, when I tried to download it from csounds.com, I got a 404 "Not found" error. Perhaps the files were lost in the last csounds.com updates?
There are any other important option I'm missing?

---
Best regards
--JL Diaz
Reply | Threaded
Open this post in threaded view
|

Re: Python and Csound

Michael Gogins
Csound 5 includes CsoundVST, which builds and runs on Windows and Linux.

CsoundVST is a Python extension module, and includes a number of algorithmic composition functions. I routinely use it to compose by writing Python code. I embed the Csound orchestra in the Python script file, so everything is in one place. There are some demo Python scripts in csound5/examples.

Note that CsoundVST includes all the compositional algorithms from the old Silence system.

Christopher Ariza also has an extensive system for algorithmic composition in Python (athenaCL), which can use Csound for rendering pieces.

Note that athenaCL includes all the code from omde/pmask.

In theory, it should be possible to use CsoundVST together with athenaCL, although athenaCL is designed to be used in an interactive command line session instead of by scripting.

Regards,
Mike

-----Original Message-----
From: JL Diaz <[hidden email]>
Sent: Sep 21, 2005 11:02 AM
To: [hidden email]
Subject: [Csnd] Python and Csound

Hello, Csounders,

Recently, I started learning Python, and I was interested in the possibility
of using Python to algorithmically generate scores for Csound. I recalled to
have read something about it, so I googled a bit, and found:

   - pmask (http://web.tiscali.it/mupuxeddu/csound/)<http://web.tiscali.it/mupuxeddu/csound/>It
is a python implementation of Cmask. However, the page was not updated
   since 2000, so I guess that it is an abanoned branch, apparently superseeded
   by:
   - omde/pmask
(http://pythonsound.sourceforge.net)<http://pythonsound.sourceforge.net>This
one appears to be a more serious attempt of integration between python
   and csound. However, the current release is marked "beta", and it is from
   2001. The documentation is incomplete. Another dead way?
   - Silence. http://www.csounds.com/gogins/silence/. Updated on May
   2003, according to the description and screenshots, this is the most
   promising option. However, when I tried to download it from
   csounds.com <http://csounds.com>, I got a 404 "Not found" error.
   Perhaps the files were lost in the last
csounds.com<http://csounds.com>updates?
   
There are any other important option I'm missing?

---
Best regards
--JL Diaz



--
Send bugs reports to this list.
To unsubscribe, send email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Python and Csound

Iain Duncan
In reply to this post by JL Diaz
> Recently, I started learning Python, and I was interested in the
> possibility of using Python to algorithmically generate scores for
> Csound. I recalled to have read something about it, so I googled a bit,
> and found:
>
>     * pmask (http://web.tiscali.it/mupuxeddu/csound/)
>       <http://web.tiscali.it/mupuxeddu/csound/> It is a python
>       implementation of Cmask. However, the page was not updated since
>       2000, so I guess that it is an abanoned branch, apparently
>       superseeded by:
>     * omde/pmask (http://pythonsound.sourceforge.net)
>       <http://pythonsound.sourceforge.net> This one appears to be a more
>       serious attempt of integration between python and csound. However,
>       the current release is marked "beta", and it is from 2001. The
>       documentation is incomplete. Another dead way?
>     * Silence. http://www.csounds.com/gogins/silence/. Updated on May
>       2003, according to the description and screenshots, this is the
>       most promising option. However, when I tried to download it from
>       csounds.com <http://csounds.com>, I got a 404 "Not found" error.
>       Perhaps the files were lost in the last csounds.com
>       <http://csounds.com> updates?
>
> There are any other important option I'm missing?

Don't know if I'd call it "important", but I also wrote a score
generating utility in python called Makescore. More an arranging tool.
You can get it off our site, http://www.xornot.com

Iain
--
Send bugs reports to this list.
To unsubscribe, send email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Python and Csound

Kevin Krebs
> > Recently, I started learning Python, and I was interested in the
> > possibility of using Python to algorithmically generate scores for
> > Csound.

  I'm in a similar position -- my python skills are mediocre and I was
hoping to learn more by working with pmask.  I've installed the
current omde/pmask and was working my way through the online tutorial
at http://pythonsound.sourceforge.net/guide/book1.html
  It was going well until I got to the the ramping feature page
(http://pythonsound.sourceforge.net/guide/x193.html).  When I try to
enter the commands as per that page, I get the following error (from
command line python interpreter):

>>> from pmask.bpf import LinearSegment
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named bpf

  Also, I notcied that when I use IDLE (v1.1.1), I can't even import pmask:

>>> import pmask

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in -toplevel-
    import pmask
  File "C:\Python24\Lib\site-packages\omde\pmask.py", line 27, in -toplevel-
    from omde.csound import I, IFactory
  File "C:\Python24\Lib\site-packages\omde\csound.py", line 410, in -toplevel-
    stdout = File(sys.stdout)
  File "C:\Python24\Lib\site-packages\omde\csound.py", line 379, in __init__
    self.file = open(file_or_filename, 'w')
TypeError: coercing to Unicode: need string or buffer, instance found


  I'm using Python 2.4.1 on Windows XP Pro.  Can anyone help?

--
--------- ------- ----- ---- --- -- - - - - -
k.m.krebs \ 833-45 :    http://www.833-45.net
nishi net.audio : http://www.notype.com/nishi
--------- ------- ----- ---- --- -- - - - - -
--
Send bugs reports to this list.
To unsubscribe, send email to [hidden email]