Re: [Csnd] Python to csound
Date | 2018-07-23 16:16 |
From | Joel Ramsbottom |
Subject | Re: [Csnd] Python to csound |
I can't see much documentation on ctcsound? is it more effective than using OSC ? Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2018-07-23 16:49 |
From | Forrest Curo |
Subject | Re: [Csnd] Python to csound |
ctcsound is neither 'more effective' or 'less effective'. It puts the commands you might want to send to csound into a graphic 'notebook' from which you can trigger them conveniently when you want them. OSC is a means of communication between instruments & programs; ctcsound is an interface between csound & you. On Mon, Jul 23, 2018 at 8:16 AM, Joel Ramsbottom <joel.ramsbottom@hotmail.co.uk> wrote: I can't see much documentation on ctcsound? is it more effective than using OSC ? |
Date | 2018-07-23 19:49 |
From | Richard |
Subject | Re: [Csnd] Python to csound |
Ctctsound is much more powerful than the 'old' python API. With
it you can directly read or write csound channels, and also
tables. OSC is somewhat trickier, you have to keep track of variable
types and there is somewhat more coding involved on both sides. A
definite advantage of OSC is that your program does not have to be
on the same computer as csound. On 23/07/18 17:49, Forrest Curo wrote:
|
Date | 2018-07-25 08:08 |
From | fauveboy |
Subject | Re: [Csnd] Python to csound |
for now I'm using aiosc module (python) library to maintain a full-duplex communication. I means that csound programs can stop and start and the osc connection can remain available -- Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2018-07-30 13:48 |
From | fauveboy |
Subject | Re: [Csnd] Python to csound |
also is csnd not used anymore and is replaced by ctcsound? https://github.com/csound/csoundAPI_examples/blob/master/python/example2.py -- Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2018-07-30 14:01 |
From | Francois PINOT |
Subject | Re: [Csnd] Python to csound |
ctcsound was introduced in Csound 6.07. ctcsound works with Python2.x and Python3.x as well, and it uses the numpy ndarray data format to point to Csound tables and channels, giving the user the opportunity to use easily the scientific computing python environment developed around numpy and scipy. csnd6 is still delivered with each Csound 6.0x release where x is greater than or equal to 7. However, it is recommended to use ctcsound instead, because csnd6 might become obsolete in the next major release of Csound (7.xx). François 2018-07-30 14:48 GMT+02:00 fauveboy <joel.ramsbottom@hotmail.co.uk>: also is csnd not used anymore and is replaced by ctcsound? |
Date | 2018-07-30 15:10 |
From | fauveboy |
Subject | Re: [Csnd] Python to csound |
Can I run/manage csound instruments inside a python script using ctcsound like csnd...if so how? -- Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2018-07-30 15:25 |
From | Francois PINOT |
Subject | Re: [Csnd] Python to csound |
ctcsound is just another wrapper from python to the Csound API, so it can do everything csnd6 does (and some more). You can have a look at the coobooks here: https://github.com/fggp/ctcsound/tree/master/cookbook, you can look at the examples here: https://github.com/csound/csoundAPI_examples/blob/master/python/CtcsoundAPIExamples.ipynb, you can read the examples in this book written by Victor: https://www.springer.com/gp/book/9783319635033. And, of course, you can look at the code itself which is fully documented like any other python module. François 2018-07-30 16:10 GMT+02:00 fauveboy <joel.ramsbottom@hotmail.co.uk>: Can I run/manage csound instruments inside a python script using ctcsound |
Date | 2018-07-30 15:38 |
From | fauveboy |
Subject | Re: [Csnd] Python to csound |
I've install everything on the page. I have a simple .py file import ctcsound...and the compiler still complain: Traceback (most recent call last): File "csoundapipython.py", line 1, in |
Date | 2018-07-30 15:46 |
From | Francois PINOT |
Subject | Re: [Csnd] Python to csound |
It means that ctcsound does not find the Csound API shared library. Which is your OS, how did you install Csound? 2018-07-30 16:38 GMT+02:00 fauveboy <joel.ramsbottom@hotmail.co.uk>: I've install everything on the page. |
Date | 2018-07-30 16:15 |
From | fauveboy |
Subject | Re: [Csnd] Python to csound |
Im running Raspbian Lite I think i just used: sudo apt-get install csound -- Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2018-07-30 16:52 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Python to csound |
you probably need libcsound64-dev or something. ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 30 Jul 2018, at 16:15, fauveboy |
Date | 2018-07-30 17:11 |
From | Francois PINOT |
Subject | Re: [Csnd] Python to csound |
You can try to create a symlink in /usr/local/lib which points to libcsound64.so. For example, if libcsound64.so is located in /usr/lib, something like that: cd /usr/local/lib ln -s /usr/lib/libcsound64.so libcsound64.so ldconfig 2018-07-30 17:15 GMT+02:00 fauveboy <joel.ramsbottom@hotmail.co.uk>: Im running Raspbian Lite I think i just used: sudo apt-get install csound |
Date | 2018-07-30 17:50 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Python to csound |
I think the symlink (and headers) are provided by the -dev package, he just needs to install it. ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 30 Jul 2018, at 17:11, Francois PINOT |
Date | 2018-07-30 17:57 |
From | Francois PINOT |
Subject | Re: [Csnd] Python to csound |
Victor is right. You should install the dev package first, and then if it doesn't work, try the symlink solution. François Le lun. 30 juil. 2018 à 18:50, Victor Lazzarini <Victor.Lazzarini@mu.ie> a écrit : I think the symlink (and headers) are provided by the -dev package, he just needs to install it. |
Date | 2018-07-30 19:50 |
From | fauveboy |
Subject | Re: [Csnd] Python to csound |
i've used: $sudo apt-get install libcsound64-dev and cd /usr/local/lib ln -s /usr/lib/libcsound64.so libcsound64.so ldconfig the error ahs changed slightly, the cli now says the following: Traceback (most recent call last): File "csoundapipython.py", line1, in |
Date | 2018-07-30 21:10 |
From | Francois PINOT |
Subject | Re: [Csnd] Python to csound |
So now libcsound64.so is found but you're using a version of ctcsound that is more recent than the one shipped with the Csound package you've installed. In fact, if some new functions are added to the Csound API, ctcsound is changed accordingly in Github. csoundCompileTreeAsync was added in Csound6.10. It seems that the Csound package you've installed is older than 6.10. So csoundCompileTreeAsync is referenced in the ctcsound module you're using but it is not found in the libcsound64.so shared library installed by the Csound package. You should replace the ctcsound.py file in your /home/pi/.local/lib/python.3. François Le lun. 30 juil. 2018 à 20:50, fauveboy <joel.ramsbottom@hotmail.co.uk i've used: |