Jupyter notebook
Date | 2016-05-29 06:30 |
From | Francois PINOT |
Subject | Jupyter notebook |
I recently developed a new Python wrapper module for the Csound API: ctcsound. This module works with Python 2 and Python 3 as well, and it is now distributed with Csound (since version 6.07). I'm actually writing a cookbook with recipes about ctcsound and Csound. This cookbook is developed using the Jupyter notebook framework (http://jupyter.org/, formerly IPython project): https://github.com/fggp/ctcsound/tree/master/cookbook. |
Date | 2016-05-29 11:14 |
From | Rory Walsh |
Subject | Re: Jupyter notebook |
Hi Francois, this looks great. We are missing an entry on the http://csound.github.io/create.html page about scientific computing with Python and Csound. Would you mind preparing a short paragraph and some links for us to include? Whenever you have a free moment. It would be great to have as much info as we can there. On 29 May 2016 at 06:30, Francois PINOT <fggpinot@gmail.com> wrote:
|
Date | 2016-05-29 12:15 |
From | T Lopez |
Subject | Re: Jupyter notebook |
I am glad you mentioned this, I was a bit confused when I clicked on that link!! On 29 May 2016 12:14, "Rory Walsh" <rorywalsh@ear.ie> wrote:
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 | 2016-05-29 12:21 |
From | Rory Walsh |
Subject | Re: Jupyter notebook |
We thought that leaving it in there might prompt someone to contribute something! On 29 May 2016 at 12:15, T Lopez <wstlopez@gmail.com> wrote:
|
Date | 2016-05-29 15:49 |
From | Andres Cabrera |
Subject | Re: Jupyter notebook |
Hi Francois, This is excellent work, and what I wanted icsound to be.I'm thinking the time is near to retire icsound... Also perhaps a next step is to write some python classes that then can do code generation, so you can write your signal processing chain in python, that compiles down to csound code. On Sat, May 28, 2016 at 10:30 PM, Francois PINOT <fggpinot@gmail.com> wrote:
|
Date | 2016-05-30 11:01 |
From | Francois PINOT |
Subject | Re: Jupyter notebook |
Hi Andrés, ctcsound is a module with the same functionality than csnd6: a wrapper to the Csound API for the Python language. The differences are:ctcsound.py is installed with Csound since version 6.07. csoundmagics uses ctcsound where icsound used csnd6. Once installed, csoundmagics can be activated in the classical way in a notebook with this command: %load_ext csoundmagics. Actually csoundmagics offers rather simple functionalities: basic edition of csd's, sco, and orc, and running them. Most of the features of icsound can be added to csoundmagics. I'll investigate this and let you know how it goes. When csoundmagics will be mature enough, we can add an entry in http://csound.github.io/create.html as Rory has suggested. Regards François 2016-05-29 16:49 GMT+02:00 Andres Cabrera <mantaraya36@gmail.com>:
|
Date | 2016-05-30 11:23 |
From | Victor Lazzarini |
Subject | Re: Jupyter notebook |
Great! I am also thinking here whether it is possible to make ctcsound as Python package that can be installed with pip or easy_install. Wouldn’t that be useful? best regards ======================== Dr 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 May 2016, at 11:01, Francois PINOT |
Date | 2016-05-30 12:15 |
From | Rory Walsh |
Subject | Re: Jupyter notebook |
I think it certainly would be cool, but only if it ships with a version of Csound. If users have to pre-install Csound to use it, then I think a few well prepared instructions are just as useful. Or? On 30 May 2016 at 11:23, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: Great! |
Date | 2016-05-30 14:00 |
From | Francois PINOT |
Subject | Re: Jupyter notebook |
Python packages installed with pip or easy_install generally resolve all their dependencies during the installation process. From this point of view, Csound would be a dependency of ctcsound... ctcsound is actually distributed with Csound and, as such, it is a part of Csound like csnd6. In fact, ctcsound should become the module to use in place of csnd6.csoundmagics could become a new version of icsound for Jupyter. François 2016-05-30 13:15 GMT+02:00 Rory Walsh <rorywalsh@ear.ie>:
|
Date | 2016-05-30 15:36 |
From | Andres Cabrera |
Subject | Re: Jupyter notebook |
That sounds great. I agree that ctcsound should replace csnd6. My only question about that would be is numpy a hard dependency of ctcsound? Cheers,On Mon, May 30, 2016 at 3:01 AM, Francois PINOT <fggpinot@gmail.com> wrote:
|
Date | 2016-05-30 16:29 |
From | Francois PINOT |
Subject | Re: Jupyter notebook |
Actually yes. The question is about having a python array type corresponding to Csound MYFLT arrays (in the sense of C arrays). In csnd6, this is done with helper classes, e.g. CsoundMYFLTArray. Numpy arrays are very efficient and the numpy API exposes means to have a pointer for the data part of the numpy array pointing to the memory block of the Csound C array. So numpy provides all the machinery to yield efficiently the C pointers that are exposed by the Csound C API. numpy is installed very easily (e.g. pip install numpy) and if you work with Jupyter notebooks, it's already there.2016-05-30 16:36 GMT+02:00 Andres Cabrera <mantaraya36@gmail.com>:
|
Date | 2016-05-30 23:01 |
From | Richard |
Subject | Re: Jupyter notebook |
I get 'no module named ctcsound' in my note book, but also in python. Python defaults now to version 3.5.1, after I installed Anaconda
(I already have 2.7) Richard On 30/05/16 17:29, Francois PINOT
wrote:
|
Date | 2016-05-30 23:36 |
From | Francois PINOT |
Subject | Re: Jupyter notebook |
Can you import it from a Python 2 session? François Le 31 mai 2016 12:02 AM, "Richard" <zappfinger@gmail.com> a écrit :
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 | 2016-05-31 08:17 |
From | Richard |
Subject | Re: Jupyter notebook |
Yes that works. I was not sure if I installed csound 6.07 before installing Anaconda, so I re-installed csound, hoping it would install for the new default Python. Unfortunately, it does not work still.
Richard On 31/05/16 00:36, Francois PINOT
wrote:
|
Date | 2016-05-31 08:54 |
From | Francois PINOT |
Subject | Re: Jupyter notebook |
Csound 6.07 installs csnd6.py and ctcsound.py in the same dir for Python 2. Type the following commands from a Python 3 console: import sys sys.path Copy ctcsound.py in one of the paths returned by sys.path (usually site-packages is used). You'll then have a copy of ctcsound.py in Python 2 PYTHONPATH and in PYTHON 3 PYTHONPATH. François 2016-05-31 9:17 GMT+02:00 Richard <zappfinger@gmail.com>:
|
Date | 2016-05-31 09:21 |
From | Richard |
Subject | Re: Jupyter notebook |
Thanks, that solves it! Richard On 31/05/16 09:54, Francois PINOT
wrote:
|