Csound Csound-dev Csound-tekno Search About

Re: Jupyter notebook and icsound

Date2016-06-13 10:47
FromFrancois PINOT
SubjectRe: Jupyter notebook and icsound
Hi Andrés,

I've integrated icsound in csoundmagics. It is now a class named ICsound. It is a child of the ctcsound.Csound class. The current engine feature (cur_ics) has been replaced by a slot system. Each running ICsound engine is bound to a slot (actually from slot#1 to slot#32).

slot#0 is reserved for a ctcsound.Csound instance to play csd's or orchestras and scores stored in the user's namespace by the %%csd, %%orc, and %%sco magics.

The %%csound magic can now have an arg specifying the slot to use. If this arg is omitted, slot#1 is used. There's a new  %csound magic to release a slot. Its arg is a slot number turned to a negative number, e.g. %csound -1 releases slot#1.

I added an entry in the csound wiki about csoundmagics: https://github.com/csound/csound/wiki/csoundmagics

Regards

François

2016-05-29 16:49 GMT+02:00 Andres Cabrera <mantaraya36@gmail.com>:
Hi Francois,

This is excellent work, and what I wanted icsound to be.

Can you consider adding the few things that icsound can do that ctcsound can't? For instance the ability to start an engine listening for network events and for creating engines that connect to remote servers (all with the same api). Also, I'm not sure if I am understanding the instructions correctly, but it seems you need an additional download to enable the magics. I am doing it with python code in icsound, but perhaps you need to do it that way for the syntax highlighter?

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.

Cheers,
Andrés

On Sat, May 28, 2016 at 10:30 PM, Francois PINOT <fggpinot@gmail.com> wrote:
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.

The fifth and the sixth recipes show how to extend Jupyter with magic commands for editing and running csd's, orchestra, and scores in a notebook code cell. Syntax highlighting is also added for Csound through a mode for CodeMirror (https://codemirror.net/) which is the editor used by Jupyter in the notebook cells.

As a side effect, people interested in using this CodeMirror mode for their own projects can download it from the cookbook: https://github.com/fggp/ctcsound/blob/master/cookbook/csoundmagics/csound.js

Regards

Francois
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

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

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

Date2016-06-13 17:28
FromAndres Cabrera
SubjectRe: Jupyter notebook and icsound
Hi Francois,

Beautiful! Great solution.

The icsound can be marked as deprecated and removed.

Cheers,
Andrés

On Mon, Jun 13, 2016 at 2:47 AM, Francois PINOT <fggpinot@gmail.com> wrote:
Hi Andrés,

I've integrated icsound in csoundmagics. It is now a class named ICsound. It is a child of the ctcsound.Csound class. The current engine feature (cur_ics) has been replaced by a slot system. Each running ICsound engine is bound to a slot (actually from slot#1 to slot#32).

slot#0 is reserved for a ctcsound.Csound instance to play csd's or orchestras and scores stored in the user's namespace by the %%csd, %%orc, and %%sco magics.

The %%csound magic can now have an arg specifying the slot to use. If this arg is omitted, slot#1 is used. There's a new  %csound magic to release a slot. Its arg is a slot number turned to a negative number, e.g. %csound -1 releases slot#1.

I added an entry in the csound wiki about csoundmagics: https://github.com/csound/csound/wiki/csoundmagics

Regards

François

2016-05-29 16:49 GMT+02:00 Andres Cabrera <mantaraya36@gmail.com>:
Hi Francois,

This is excellent work, and what I wanted icsound to be.

Can you consider adding the few things that icsound can do that ctcsound can't? For instance the ability to start an engine listening for network events and for creating engines that connect to remote servers (all with the same api). Also, I'm not sure if I am understanding the instructions correctly, but it seems you need an additional download to enable the magics. I am doing it with python code in icsound, but perhaps you need to do it that way for the syntax highlighter?

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.

Cheers,
Andrés

On Sat, May 28, 2016 at 10:30 PM, Francois PINOT <fggpinot@gmail.com> wrote:
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.

The fifth and the sixth recipes show how to extend Jupyter with magic commands for editing and running csd's, orchestra, and scores in a notebook code cell. Syntax highlighting is also added for Csound through a mode for CodeMirror (https://codemirror.net/) which is the editor used by Jupyter in the notebook cells.

As a side effect, people interested in using this CodeMirror mode for their own projects can download it from the cookbook: https://github.com/fggp/ctcsound/blob/master/cookbook/csoundmagics/csound.js

Regards

Francois
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

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

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

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

Date2016-06-13 22:09
FromFrancois PINOT
SubjectRe: Jupyter notebook and icsound
Maybe we should keep it for backward compatibility...

François

2016-06-13 18:28 GMT+02:00 Andres Cabrera <mantaraya36@gmail.com>:
Hi Francois,

Beautiful! Great solution.

The icsound can be marked as deprecated and removed.

Cheers,
Andrés

On Mon, Jun 13, 2016 at 2:47 AM, Francois PINOT <fggpinot@gmail.com> wrote:
Hi Andrés,

I've integrated icsound in csoundmagics. It is now a class named ICsound. It is a child of the ctcsound.Csound class. The current engine feature (cur_ics) has been replaced by a slot system. Each running ICsound engine is bound to a slot (actually from slot#1 to slot#32).

slot#0 is reserved for a ctcsound.Csound instance to play csd's or orchestras and scores stored in the user's namespace by the %%csd, %%orc, and %%sco magics.

The %%csound magic can now have an arg specifying the slot to use. If this arg is omitted, slot#1 is used. There's a new  %csound magic to release a slot. Its arg is a slot number turned to a negative number, e.g. %csound -1 releases slot#1.

I added an entry in the csound wiki about csoundmagics: https://github.com/csound/csound/wiki/csoundmagics

Regards

François

2016-05-29 16:49 GMT+02:00 Andres Cabrera <mantaraya36@gmail.com>:
Hi Francois,

This is excellent work, and what I wanted icsound to be.

Can you consider adding the few things that icsound can do that ctcsound can't? For instance the ability to start an engine listening for network events and for creating engines that connect to remote servers (all with the same api). Also, I'm not sure if I am understanding the instructions correctly, but it seems you need an additional download to enable the magics. I am doing it with python code in icsound, but perhaps you need to do it that way for the syntax highlighter?

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.

Cheers,
Andrés

On Sat, May 28, 2016 at 10:30 PM, Francois PINOT <fggpinot@gmail.com> wrote:
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.

The fifth and the sixth recipes show how to extend Jupyter with magic commands for editing and running csd's, orchestra, and scores in a notebook code cell. Syntax highlighting is also added for Csound through a mode for CodeMirror (https://codemirror.net/) which is the editor used by Jupyter in the notebook cells.

As a side effect, people interested in using this CodeMirror mode for their own projects can download it from the cookbook: https://github.com/fggp/ctcsound/blob/master/cookbook/csoundmagics/csound.js

Regards

Francois
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

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

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

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

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

Date2016-06-14 02:44
FromAndres Cabrera
SubjectRe: Jupyter notebook and icsound

Ok. But perhaps it should become a thin wrapper to CTC sound. That way it could support Python version 3 too.

Cheers,
Andrés

On Jun 13, 2016 2:09 PM, "Francois PINOT" <fggpinot@gmail.com> wrote:
Maybe we should keep it for backward compatibility...

François

2016-06-13 18:28 GMT+02:00 Andres Cabrera <mantaraya36@gmail.com>:
Hi Francois,

Beautiful! Great solution.

The icsound can be marked as deprecated and removed.

Cheers,
Andrés

On Mon, Jun 13, 2016 at 2:47 AM, Francois PINOT <fggpinot@gmail.com> wrote:
Hi Andrés,

I've integrated icsound in csoundmagics. It is now a class named ICsound. It is a child of the ctcsound.Csound class. The current engine feature (cur_ics) has been replaced by a slot system. Each running ICsound engine is bound to a slot (actually from slot#1 to slot#32).

slot#0 is reserved for a ctcsound.Csound instance to play csd's or orchestras and scores stored in the user's namespace by the %%csd, %%orc, and %%sco magics.

The %%csound magic can now have an arg specifying the slot to use. If this arg is omitted, slot#1 is used. There's a new  %csound magic to release a slot. Its arg is a slot number turned to a negative number, e.g. %csound -1 releases slot#1.

I added an entry in the csound wiki about csoundmagics: https://github.com/csound/csound/wiki/csoundmagics

Regards

François

2016-05-29 16:49 GMT+02:00 Andres Cabrera <mantaraya36@gmail.com>:
Hi Francois,

This is excellent work, and what I wanted icsound to be.

Can you consider adding the few things that icsound can do that ctcsound can't? For instance the ability to start an engine listening for network events and for creating engines that connect to remote servers (all with the same api). Also, I'm not sure if I am understanding the instructions correctly, but it seems you need an additional download to enable the magics. I am doing it with python code in icsound, but perhaps you need to do it that way for the syntax highlighter?

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.

Cheers,
Andrés

On Sat, May 28, 2016 at 10:30 PM, Francois PINOT <fggpinot@gmail.com> wrote:
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.

The fifth and the sixth recipes show how to extend Jupyter with magic commands for editing and running csd's, orchestra, and scores in a notebook code cell. Syntax highlighting is also added for Csound through a mode for CodeMirror (https://codemirror.net/) which is the editor used by Jupyter in the notebook cells.

As a side effect, people interested in using this CodeMirror mode for their own projects can download it from the cookbook: https://github.com/fggp/ctcsound/blob/master/cookbook/csoundmagics/csound.js

Regards

Francois
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

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

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

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

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
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

Date2016-06-14 07:47
FromFrancois PINOT
SubjectRe: Jupyter notebook and icsound
I was thinking of marking it as deprecated, but keeping it in case it is needed to run notebooks that were using it. For new notebooks, people should use csoundmagics.

François

2016-06-14 3:44 GMT+02:00 Andres Cabrera <mantaraya36@gmail.com>:

Ok. But perhaps it should become a thin wrapper to CTC sound. That way it could support Python version 3 too.

Cheers,
Andrés

On Jun 13, 2016 2:09 PM, "Francois PINOT" <fggpinot@gmail.com> wrote:
Maybe we should keep it for backward compatibility...

François

2016-06-13 18:28 GMT+02:00 Andres Cabrera <mantaraya36@gmail.com>:
Hi Francois,

Beautiful! Great solution.

The icsound can be marked as deprecated and removed.

Cheers,
Andrés

On Mon, Jun 13, 2016 at 2:47 AM, Francois PINOT <fggpinot@gmail.com> wrote:
Hi Andrés,

I've integrated icsound in csoundmagics. It is now a class named ICsound. It is a child of the ctcsound.Csound class. The current engine feature (cur_ics) has been replaced by a slot system. Each running ICsound engine is bound to a slot (actually from slot#1 to slot#32).

slot#0 is reserved for a ctcsound.Csound instance to play csd's or orchestras and scores stored in the user's namespace by the %%csd, %%orc, and %%sco magics.

The %%csound magic can now have an arg specifying the slot to use. If this arg is omitted, slot#1 is used. There's a new  %csound magic to release a slot. Its arg is a slot number turned to a negative number, e.g. %csound -1 releases slot#1.

I added an entry in the csound wiki about csoundmagics: https://github.com/csound/csound/wiki/csoundmagics

Regards

François

2016-05-29 16:49 GMT+02:00 Andres Cabrera <mantaraya36@gmail.com>:
Hi Francois,

This is excellent work, and what I wanted icsound to be.

Can you consider adding the few things that icsound can do that ctcsound can't? For instance the ability to start an engine listening for network events and for creating engines that connect to remote servers (all with the same api). Also, I'm not sure if I am understanding the instructions correctly, but it seems you need an additional download to enable the magics. I am doing it with python code in icsound, but perhaps you need to do it that way for the syntax highlighter?

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.

Cheers,
Andrés

On Sat, May 28, 2016 at 10:30 PM, Francois PINOT <fggpinot@gmail.com> wrote:
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.

The fifth and the sixth recipes show how to extend Jupyter with magic commands for editing and running csd's, orchestra, and scores in a notebook code cell. Syntax highlighting is also added for Csound through a mode for CodeMirror (https://codemirror.net/) which is the editor used by Jupyter in the notebook cells.

As a side effect, people interested in using this CodeMirror mode for their own projects can download it from the cookbook: https://github.com/fggp/ctcsound/blob/master/cookbook/csoundmagics/csound.js

Regards

Francois
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

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

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

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

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
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

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