Csound Csound-dev Csound-tekno Search About

[Csnd] A couple of questions about CSound and Python

Date2022-01-09 21:34
FromSusanne Pedersen
Subject[Csnd] A couple of questions about CSound and Python

Hi all,

I am new to both CSound and this list. I am also learning Python, and would like to combine the two, once I become good enough at both. However, I have a couple of questions at this point. I am unsure if this is the correct list to ask these questions, but I’ll try. If they should be asked on the developer list, please let me know.

My first question is, is there any particular reason that I must use Jupyter Notebooks, apart from the fact that the various examples of code are meant to be used with it? I’ll use it, if I absolutely have to, but I would prefer not to do so, if it is possible. As far as I can tell, the code can be written in any normal editor for text or code, and I even tried an example in the Python interactive interpreter with success. So is Jupyter Notebooks really necessary, and if so, why?

My second question is about porting CSound to Work with Python 3. I know, it’s not a big deal for me to install Python 2.7, but I personally think, it would be nicer to have only one version of Python to Work with, especially if I want to distribute programs, I create, to others. The less stuff to install, the better in my opinion. The Floss manual talks about a plugin, and I looked at the Github page, but I’m not sure what to do from there. Can anyone explain how to actually use this plugin to port CSound? I have always worked with Python 3, so I don’t have any prior experience with porting from Python 2.

 

Thanks in advance,

Susanne Pedersen

 


Date2022-01-09 22:08
Fromjoachim heintz
SubjectRe: [Csnd] A couple of questions about CSound and Python
hi susanne -

working in the jupyter notebooks is certainly only one option..

and ctcsound is python3: https://github.com/csound/ctcsound

(assuming you speak about using csound via API in python, not python 
integrated in csound.)

best -
	joachim


On 09/01/2022 22:34, Susanne Pedersen wrote:
> Hi all,
> 
> I am new to both CSound and this list. I am also learning Python, and 
> would like to combine the two, once I become good enough at both. 
> However, I have a couple of questions at this point. I am unsure if this 
> is the correct list to ask these questions, but I’ll try. If they should 
> be asked on the developer list, please let me know.
> 
> My first question is, is there any particular reason that I must use 
> Jupyter Notebooks, apart from the fact that the various examples of code 
> are meant to be used with it? I’ll use it, if I absolutely have to, but 
> I would prefer not to do so, if it is possible. As far as I can tell, 
> the code can be written in any normal editor for text or code, and I 
> even tried an example in the Python interactive interpreter with 
> success. So is Jupyter Notebooks really necessary, and if so, why?
> 
> My second question is about porting CSound to Work with Python 3. I 
> know, it’s not a big deal for me to install Python 2.7, but I personally 
> think, it would be nicer to have only one version of Python to Work 
> with, especially if I want to distribute programs, I create, to others. 
> The less stuff to install, the better in my opinion. The Floss manual 
> talks about a plugin, and I looked at the Github page, but I’m not sure 
> what to do from there. Can anyone explain how to actually use this 
> plugin to port CSound? I have always worked with Python 3, so I don’t 
> have any prior experience with porting from Python 2.
> 
> Thanks in advance,
> 
> Susanne Pedersen
> 
> 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

Date2022-01-09 23:25
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] A couple of questions about CSound and Python
The ctcsound module runs on Python 3 (as well as 2). The csnd6 module was deprecated and it is not even packaged anymore on MacOS and Windows. 

Prof. Victor Lazzarini
Maynooth University
Ireland

On 9 Jan 2022, at 21:45, Susanne Pedersen <sp@susanne-pedersen.dk> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Hi all,

I am new to both CSound and this list. I am also learning Python, and would like to combine the two, once I become good enough at both. However, I have a couple of questions at this point. I am unsure if this is the correct list to ask these questions, but I’ll try. If they should be asked on the developer list, please let me know.

My first question is, is there any particular reason that I must use Jupyter Notebooks, apart from the fact that the various examples of code are meant to be used with it? I’ll use it, if I absolutely have to, but I would prefer not to do so, if it is possible. As far as I can tell, the code can be written in any normal editor for text or code, and I even tried an example in the Python interactive interpreter with success. So is Jupyter Notebooks really necessary, and if so, why?

My second question is about porting CSound to Work with Python 3. I know, it’s not a big deal for me to install Python 2.7, but I personally think, it would be nicer to have only one version of Python to Work with, especially if I want to distribute programs, I create, to others. The less stuff to install, the better in my opinion. The Floss manual talks about a plugin, and I looked at the Github page, but I’m not sure what to do from there. Can anyone explain how to actually use this plugin to port CSound? I have always worked with Python 3, so I don’t have any prior experience with porting from Python 2.

 

Thanks in advance,

Susanne Pedersen

 

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

Date2022-01-10 08:19
FromFrancois PINOT
SubjectRe: [Csnd] A couple of questions about CSound and Python
Examples using ctcsound.py with Python 3 and without using Jupyter can be seen here: https://github.com/csound/csoundAPI_examples/tree/master/python/py3

François

Le dim. 9 janv. 2022 à 22:44, Susanne Pedersen <sp@susanne-pedersen.dk> a écrit :

Hi all,

I am new to both CSound and this list. I am also learning Python, and would like to combine the two, once I become good enough at both. However, I have a couple of questions at this point. I am unsure if this is the correct list to ask these questions, but I’ll try. If they should be asked on the developer list, please let me know.

My first question is, is there any particular reason that I must use Jupyter Notebooks, apart from the fact that the various examples of code are meant to be used with it? I’ll use it, if I absolutely have to, but I would prefer not to do so, if it is possible. As far as I can tell, the code can be written in any normal editor for text or code, and I even tried an example in the Python interactive interpreter with success. So is Jupyter Notebooks really necessary, and if so, why?

My second question is about porting CSound to Work with Python 3. I know, it’s not a big deal for me to install Python 2.7, but I personally think, it would be nicer to have only one version of Python to Work with, especially if I want to distribute programs, I create, to others. The less stuff to install, the better in my opinion. The Floss manual talks about a plugin, and I looked at the Github page, but I’m not sure what to do from there. Can anyone explain how to actually use this plugin to port CSound? I have always worked with Python 3, so I don’t have any prior experience with porting from Python 2.

 

Thanks in advance,

Susanne Pedersen

 

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

Date2022-01-10 10:13
FromOeyvind Brandtsegg
SubjectRe: [Csnd] A couple of questions about CSound and Python
Hi Susanne,

Welcome to the community, and wonderful idea to combine Csound and Python! The two languages complement each other very nicely and you will be able to build some very nice things with them together. You can run Python as the main program and load Csound as a module (with ctcsound) and this works with Python 3. No need to use Jupyter unless you find it helpful. This is the most standard way of combining Csound and Python, and will work well for most purposes.

Another way is to run Csound as the main program and then access Python via the py opcodes (e.g. pycall, pyrun etc), and this is probably the reason why you thought that you needed Python 2 (as the py opcodes are compiled for a specific Python version and have not yet been updated for Python 3). There are some limitations with the py opcodes that makes it slightly cumbersome to work with, so I would not recommend that route unless you really need it.

Yet another way that I have been using more and more is to run the two programs as separate processes and just use OSC to communicate between them. This can be useful for example if I wrap the Csound instruments as VSTs to run in a DAW, and I do not want the Python interpreter to potentially interfere with the audio thread of the whole DAW. Running Python as a server in the background allows Csound then to run very lightweight and only be taxed with producing audio in realtime, then Csound can poll the Python server for data values to use for note parameters and similar.

As Francois mentioned, the ctcsound examples are a good place to start. I just wanted to mention these other possibilities to fill out the context.

All best
Øyvind Brandtsegg

søn. 9. jan. 2022 kl. 22:44 skrev Susanne Pedersen <sp@susanne-pedersen.dk>:

Hi all,

I am new to both CSound and this list. I am also learning Python, and would like to combine the two, once I become good enough at both. However, I have a couple of questions at this point. I am unsure if this is the correct list to ask these questions, but I’ll try. If they should be asked on the developer list, please let me know.

My first question is, is there any particular reason that I must use Jupyter Notebooks, apart from the fact that the various examples of code are meant to be used with it? I’ll use it, if I absolutely have to, but I would prefer not to do so, if it is possible. As far as I can tell, the code can be written in any normal editor for text or code, and I even tried an example in the Python interactive interpreter with success. So is Jupyter Notebooks really necessary, and if so, why?

My second question is about porting CSound to Work with Python 3. I know, it’s not a big deal for me to install Python 2.7, but I personally think, it would be nicer to have only one version of Python to Work with, especially if I want to distribute programs, I create, to others. The less stuff to install, the better in my opinion. The Floss manual talks about a plugin, and I looked at the Github page, but I’m not sure what to do from there. Can anyone explain how to actually use this plugin to port CSound? I have always worked with Python 3, so I don’t have any prior experience with porting from Python 2.

 

Thanks in advance,

Susanne Pedersen

 

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

Date2022-01-10 13:00
FromFrancois PINOT
SubjectRe: [Csnd] A couple of questions about CSound and Python
In fact the py opcodes have been ported to Python 3. They're not distributed with the core Csound release anymore. They are available in the plugins repository (https://github.com/csound/plugins), as they depend on third party libraries.

François

Le lun. 10 janv. 2022 à 11:13, Oeyvind Brandtsegg <obrandts@gmail.com> a écrit :
Hi Susanne,

Welcome to the community, and wonderful idea to combine Csound and Python! The two languages complement each other very nicely and you will be able to build some very nice things with them together. You can run Python as the main program and load Csound as a module (with ctcsound) and this works with Python 3. No need to use Jupyter unless you find it helpful. This is the most standard way of combining Csound and Python, and will work well for most purposes.

Another way is to run Csound as the main program and then access Python via the py opcodes (e.g. pycall, pyrun etc), and this is probably the reason why you thought that you needed Python 2 (as the py opcodes are compiled for a specific Python version and have not yet been updated for Python 3). There are some limitations with the py opcodes that makes it slightly cumbersome to work with, so I would not recommend that route unless you really need it.

Yet another way that I have been using more and more is to run the two programs as separate processes and just use OSC to communicate between them. This can be useful for example if I wrap the Csound instruments as VSTs to run in a DAW, and I do not want the Python interpreter to potentially interfere with the audio thread of the whole DAW. Running Python as a server in the background allows Csound then to run very lightweight and only be taxed with producing audio in realtime, then Csound can poll the Python server for data values to use for note parameters and similar.

As Francois mentioned, the ctcsound examples are a good place to start. I just wanted to mention these other possibilities to fill out the context.

All best
Øyvind Brandtsegg

søn. 9. jan. 2022 kl. 22:44 skrev Susanne Pedersen <sp@susanne-pedersen.dk>:

Hi all,

I am new to both CSound and this list. I am also learning Python, and would like to combine the two, once I become good enough at both. However, I have a couple of questions at this point. I am unsure if this is the correct list to ask these questions, but I’ll try. If they should be asked on the developer list, please let me know.

My first question is, is there any particular reason that I must use Jupyter Notebooks, apart from the fact that the various examples of code are meant to be used with it? I’ll use it, if I absolutely have to, but I would prefer not to do so, if it is possible. As far as I can tell, the code can be written in any normal editor for text or code, and I even tried an example in the Python interactive interpreter with success. So is Jupyter Notebooks really necessary, and if so, why?

My second question is about porting CSound to Work with Python 3. I know, it’s not a big deal for me to install Python 2.7, but I personally think, it would be nicer to have only one version of Python to Work with, especially if I want to distribute programs, I create, to others. The less stuff to install, the better in my opinion. The Floss manual talks about a plugin, and I looked at the Github page, but I’m not sure what to do from there. Can anyone explain how to actually use this plugin to port CSound? I have always worked with Python 3, so I don’t have any prior experience with porting from Python 2.

 

Thanks in advance,

Susanne Pedersen

 

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

Date2022-01-10 13:56
FromOeyvind Brandtsegg
SubjectRe: [Csnd] A couple of questions about CSound and Python
Oh, that is great. Thanks!

man. 10. jan. 2022 kl. 14:00 skrev Francois PINOT <fggpinot@gmail.com>:
In fact the py opcodes have been ported to Python 3. They're not distributed with the core Csound release anymore. They are available in the plugins repository (https://github.com/csound/plugins), as they depend on third party libraries.

François

Le lun. 10 janv. 2022 à 11:13, Oeyvind Brandtsegg <obrandts@gmail.com> a écrit :
Hi Susanne,

Welcome to the community, and wonderful idea to combine Csound and Python! The two languages complement each other very nicely and you will be able to build some very nice things with them together. You can run Python as the main program and load Csound as a module (with ctcsound) and this works with Python 3. No need to use Jupyter unless you find it helpful. This is the most standard way of combining Csound and Python, and will work well for most purposes.

Another way is to run Csound as the main program and then access Python via the py opcodes (e.g. pycall, pyrun etc), and this is probably the reason why you thought that you needed Python 2 (as the py opcodes are compiled for a specific Python version and have not yet been updated for Python 3). There are some limitations with the py opcodes that makes it slightly cumbersome to work with, so I would not recommend that route unless you really need it.

Yet another way that I have been using more and more is to run the two programs as separate processes and just use OSC to communicate between them. This can be useful for example if I wrap the Csound instruments as VSTs to run in a DAW, and I do not want the Python interpreter to potentially interfere with the audio thread of the whole DAW. Running Python as a server in the background allows Csound then to run very lightweight and only be taxed with producing audio in realtime, then Csound can poll the Python server for data values to use for note parameters and similar.

As Francois mentioned, the ctcsound examples are a good place to start. I just wanted to mention these other possibilities to fill out the context.

All best
Øyvind Brandtsegg

søn. 9. jan. 2022 kl. 22:44 skrev Susanne Pedersen <sp@susanne-pedersen.dk>:

Hi all,

I am new to both CSound and this list. I am also learning Python, and would like to combine the two, once I become good enough at both. However, I have a couple of questions at this point. I am unsure if this is the correct list to ask these questions, but I’ll try. If they should be asked on the developer list, please let me know.

My first question is, is there any particular reason that I must use Jupyter Notebooks, apart from the fact that the various examples of code are meant to be used with it? I’ll use it, if I absolutely have to, but I would prefer not to do so, if it is possible. As far as I can tell, the code can be written in any normal editor for text or code, and I even tried an example in the Python interactive interpreter with success. So is Jupyter Notebooks really necessary, and if so, why?

My second question is about porting CSound to Work with Python 3. I know, it’s not a big deal for me to install Python 2.7, but I personally think, it would be nicer to have only one version of Python to Work with, especially if I want to distribute programs, I create, to others. The less stuff to install, the better in my opinion. The Floss manual talks about a plugin, and I looked at the Github page, but I’m not sure what to do from there. Can anyone explain how to actually use this plugin to port CSound? I have always worked with Python 3, so I don’t have any prior experience with porting from Python 2.

 

Thanks in advance,

Susanne Pedersen

 

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

Date2022-01-10 18:02
FromSusanne Pedersen
SubjectRe: [Csnd] A couple of questions about CSound and Python

Hi François.

Thanks a lot for the link. I’ll check it out.

 

Best regards,

Susanne

 

 

From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> On Behalf Of Francois PINOT
Sent: 10. januar 2022 09:19
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] A couple of questions about CSound and Python

 

Examples using ctcsound.py with Python 3 and without using Jupyter can be seen here: https://github.com/csound/csoundAPI_examples/tree/master/python/py3

 

François

 

Le dim. 9 janv. 2022 à 22:44, Susanne Pedersen <sp@susanne-pedersen.dk> a écrit :

Hi all,

I am new to both CSound and this list. I am also learning Python, and would like to combine the two, once I become good enough at both. However, I have a couple of questions at this point. I am unsure if this is the correct list to ask these questions, but I’ll try. If they should be asked on the developer list, please let me know.

My first question is, is there any particular reason that I must use Jupyter Notebooks, apart from the fact that the various examples of code are meant to be used with it? I’ll use it, if I absolutely have to, but I would prefer not to do so, if it is possible. As far as I can tell, the code can be written in any normal editor for text or code, and I even tried an example in the Python interactive interpreter with success. So is Jupyter Notebooks really necessary, and if so, why?

My second question is about porting CSound to Work with Python 3. I know, it’s not a big deal for me to install Python 2.7, but I personally think, it would be nicer to have only one version of Python to Work with, especially if I want to distribute programs, I create, to others. The less stuff to install, the better in my opinion. The Floss manual talks about a plugin, and I looked at the Github page, but I’m not sure what to do from there. Can anyone explain how to actually use this plugin to port CSound? I have always worked with Python 3, so I don’t have any prior experience with porting from Python 2.

 

Thanks in advance,

Susanne Pedersen

 

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


Date2022-01-10 18:17
FromSusanne Pedersen
SubjectRe: [Csnd] A couple of questions about CSound and Python

Hi Øyvind.

Thanks for the clarification.

The reason, I thought, Python 2 was necessary was that I couldn’t get earlier versions of Csound to work at all without it. However, I just got a new computer, and tried installing it without also installing Python 2, and this time, it works with no problems. Another reason was that during the installation, you get the option to install Python features, and this option specifically mentions that Python 2.7 is required.

For now, I intend to use Csound from within Python code. I intend to use Csound for handling audio in games, as the sound handling abilities of Pygame are very limited in my opinion. I have looked at other options, but to me, it looks like Csound is the most flexible and versatile one.

 

Best regards,

Susanne

 

 

From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> On Behalf Of Oeyvind Brandtsegg
Sent: 10. januar 2022 11:13
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] A couple of questions about CSound and Python

 

Hi Susanne,

 

Welcome to the community, and wonderful idea to combine Csound and Python! The two languages complement each other very nicely and you will be able to build some very nice things with them together. You can run Python as the main program and load Csound as a module (with ctcsound) and this works with Python 3. No need to use Jupyter unless you find it helpful. This is the most standard way of combining Csound and Python, and will work well for most purposes.

 

Another way is to run Csound as the main program and then access Python via the py opcodes (e.g. pycall, pyrun etc), and this is probably the reason why you thought that you needed Python 2 (as the py opcodes are compiled for a specific Python version and have not yet been updated for Python 3). There are some limitations with the py opcodes that makes it slightly cumbersome to work with, so I would not recommend that route unless you really need it.

 

Yet another way that I have been using more and more is to run the two programs as separate processes and just use OSC to communicate between them. This can be useful for example if I wrap the Csound instruments as VSTs to run in a DAW, and I do not want the Python interpreter to potentially interfere with the audio thread of the whole DAW. Running Python as a server in the background allows Csound then to run very lightweight and only be taxed with producing audio in realtime, then Csound can poll the Python server for data values to use for note parameters and similar.

 

As Francois mentioned, the ctcsound examples are a good place to start. I just wanted to mention these other possibilities to fill out the context.

 

All best

Øyvind Brandtsegg

 

søn. 9. jan. 2022 kl. 22:44 skrev Susanne Pedersen <sp@susanne-pedersen.dk>:

Hi all,

I am new to both CSound and this list. I am also learning Python, and would like to combine the two, once I become good enough at both. However, I have a couple of questions at this point. I am unsure if this is the correct list to ask these questions, but I’ll try. If they should be asked on the developer list, please let me know.

My first question is, is there any particular reason that I must use Jupyter Notebooks, apart from the fact that the various examples of code are meant to be used with it? I’ll use it, if I absolutely have to, but I would prefer not to do so, if it is possible. As far as I can tell, the code can be written in any normal editor for text or code, and I even tried an example in the Python interactive interpreter with success. So is Jupyter Notebooks really necessary, and if so, why?

My second question is about porting CSound to Work with Python 3. I know, it’s not a big deal for me to install Python 2.7, but I personally think, it would be nicer to have only one version of Python to Work with, especially if I want to distribute programs, I create, to others. The less stuff to install, the better in my opinion. The Floss manual talks about a plugin, and I looked at the Github page, but I’m not sure what to do from there. Can anyone explain how to actually use this plugin to port CSound? I have always worked with Python 3, so I don’t have any prior experience with porting from Python 2.

 

Thanks in advance,

Susanne Pedersen

 

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


Date2022-01-10 22:46
Fromjoachim heintz
SubjectRe: [Csnd] A couple of questions about CSound and Python
hi oeyvind -

thanks for the detailed insights.  may i ask: what are you using as GUI?

cheers -
	joachim


On 10/01/2022 11:13, Oeyvind Brandtsegg wrote:
> Hi Susanne,
> 
> Welcome to the community, and wonderful idea to combine Csound and 
> Python! The two languages complement each other very nicely and you will 
> be able to build some very nice things with them together. You can run 
> Python as the main program and load Csound as a module (with ctcsound) 
> and this works with Python 3. No need to use Jupyter unless you find it 
> helpful. This is the most standard way of combining Csound and Python, 
> and will work well for most purposes.
> 
> Another way is to run Csound as the main program and then access Python 
> via the py opcodes (e.g. pycall, pyrun etc), and this is probably the 
> reason why you thought that you needed Python 2 (as the py opcodes are 
> compiled for a specific Python version and have not yet been updated for 
> Python 3). There are some limitations with the py opcodes that makes it 
> slightly cumbersome to work with, so I would not recommend that route 
> unless you really need it.
> 
> Yet another way that I have been using more and more is to run the two 
> programs as separate processes and just use OSC to communicate between 
> them. This can be useful for example if I wrap the Csound instruments as 
> VSTs to run in a DAW, and I do not want the Python interpreter to 
> potentially interfere with the audio thread of the whole DAW. Running 
> Python as a server in the background allows Csound then to run very 
> lightweight and only be taxed with producing audio in realtime, then 
> Csound can poll the Python server for data values to use for note 
> parameters and similar.
> 
> As Francois mentioned, the ctcsound examples are a good place to start. 
> I just wanted to mention these other possibilities to fill out the context.
> 
> All best
> Øyvind Brandtsegg
> 
> søn. 9. jan. 2022 kl. 22:44 skrev Susanne Pedersen 
> >:
> 
>     Hi all,
> 
>     I am new to both CSound and this list. I am also learning Python,
>     and would like to combine the two, once I become good enough at
>     both. However, I have a couple of questions at this point. I am
>     unsure if this is the correct list to ask these questions, but I’ll
>     try. If they should be asked on the developer list, please let me know.
> 
>     My first question is, is there any particular reason that I must use
>     Jupyter Notebooks, apart from the fact that the various examples of
>     code are meant to be used with it? I’ll use it, if I absolutely have
>     to, but I would prefer not to do so, if it is possible. As far as I
>     can tell, the code can be written in any normal editor for text or
>     code, and I even tried an example in the Python interactive
>     interpreter with success. So is Jupyter Notebooks really necessary,
>     and if so, why?
> 
>     My second question is about porting CSound to Work with Python 3. I
>     know, it’s not a big deal for me to install Python 2.7, but I
>     personally think, it would be nicer to have only one version of
>     Python to Work with, especially if I want to distribute programs, I
>     create, to others. The less stuff to install, the better in my
>     opinion. The Floss manual talks about a plugin, and I looked at the
>     Github page, but I’m not sure what to do from there. Can anyone
>     explain how to actually use this plugin to port CSound? I have
>     always worked with Python 3, so I don’t have any prior experience
>     with porting from Python 2.
> 
>     __ __
> 
>     Thanks in advance,
> 
>     Susanne Pedersen
> 
>     __ __
> 
>     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

Date2022-01-11 07:32
FromOeyvind Brandtsegg
SubjectRe: [Csnd] A couple of questions about CSound and Python
Hi Joachim,

Do you mean what I use as a GUI when I warp Csound as a VST and communicate with Python via OSC?
Wrapping as VST is done with Cabbage, so that creates the possibility of a GUI on the DAW end. On the Python end I do not really need a GUI as it is just a command line back end where control parameters are sent via OSC from the VST.

all best
Øyvind

man. 10. jan. 2022 kl. 23:46 skrev joachim heintz <jh@joachimheintz.de>:
hi oeyvind -

thanks for the detailed insights.  may i ask: what are you using as GUI?

cheers -
        joachim


On 10/01/2022 11:13, Oeyvind Brandtsegg wrote:
> Hi Susanne,
>
> Welcome to the community, and wonderful idea to combine Csound and
> Python! The two languages complement each other very nicely and you will
> be able to build some very nice things with them together. You can run
> Python as the main program and load Csound as a module (with ctcsound)
> and this works with Python 3. No need to use Jupyter unless you find it
> helpful. This is the most standard way of combining Csound and Python,
> and will work well for most purposes.
>
> Another way is to run Csound as the main program and then access Python
> via the py opcodes (e.g. pycall, pyrun etc), and this is probably the
> reason why you thought that you needed Python 2 (as the py opcodes are
> compiled for a specific Python version and have not yet been updated for
> Python 3). There are some limitations with the py opcodes that makes it
> slightly cumbersome to work with, so I would not recommend that route
> unless you really need it.
>
> Yet another way that I have been using more and more is to run the two
> programs as separate processes and just use OSC to communicate between
> them. This can be useful for example if I wrap the Csound instruments as
> VSTs to run in a DAW, and I do not want the Python interpreter to
> potentially interfere with the audio thread of the whole DAW. Running
> Python as a server in the background allows Csound then to run very
> lightweight and only be taxed with producing audio in realtime, then
> Csound can poll the Python server for data values to use for note
> parameters and similar.
>
> As Francois mentioned, the ctcsound examples are a good place to start.
> I just wanted to mention these other possibilities to fill out the context.
>
> All best
> Øyvind Brandtsegg
>
> søn. 9. jan. 2022 kl. 22:44 skrev Susanne Pedersen
> <sp@susanne-pedersen.dk <mailto:sp@susanne-pedersen.dk>>:
>
>     Hi all,
>
>     I am new to both CSound and this list. I am also learning Python,
>     and would like to combine the two, once I become good enough at
>     both. However, I have a couple of questions at this point. I am
>     unsure if this is the correct list to ask these questions, but I’ll
>     try. If they should be asked on the developer list, please let me know.
>
>     My first question is, is there any particular reason that I must use
>     Jupyter Notebooks, apart from the fact that the various examples of
>     code are meant to be used with it? I’ll use it, if I absolutely have
>     to, but I would prefer not to do so, if it is possible. As far as I
>     can tell, the code can be written in any normal editor for text or
>     code, and I even tried an example in the Python interactive
>     interpreter with success. So is Jupyter Notebooks really necessary,
>     and if so, why?
>
>     My second question is about porting CSound to Work with Python 3. I
>     know, it’s not a big deal for me to install Python 2.7, but I
>     personally think, it would be nicer to have only one version of
>     Python to Work with, especially if I want to distribute programs, I
>     create, to others. The less stuff to install, the better in my
>     opinion. The Floss manual talks about a plugin, and I looked at the
>     Github page, but I’m not sure what to do from there. Can anyone
>     explain how to actually use this plugin to port CSound? I have
>     always worked with Python 3, so I don’t have any prior experience
>     with porting from Python 2.
>
>     __ __
>
>     Thanks in advance,
>
>     Susanne Pedersen
>
>     __ __
>
>     Csound mailing list Csound@listserv.heanet.ie
>     <mailto:Csound@listserv.heanet.ie>
>     https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>     <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND> Send bugs reports
>     to https://github.com/csound/csound/issues
>     <https://github.com/csound/csound/issues> Discussions of bugs and
>     features can be posted here
>
> Csound mailing list Csound@listserv.heanet.ie
> <mailto:Csound@listserv.heanet.ie>
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND> Send bugs reports to
> https://github.com/csound/csound/issues
> <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

Date2022-01-11 07:53
Fromjoachim heintz
SubjectRe: [Csnd] A couple of questions about CSound and Python
thanks oeyvind.  yes i was wondering whether you use the DAW for GUI, or 
anything else in python.
cheers -	
	joachim


On 11/01/2022 08:32, Oeyvind Brandtsegg wrote:
> Hi Joachim,
> 
> Do you mean what I use as a GUI when I warp Csound as a VST and 
> communicate with Python via OSC?
> Wrapping as VST is done with Cabbage, so that creates the possibility of 
> a GUI on the DAW end. On the Python end I do not really need a GUI as it 
> is just a command line back end where control parameters are sent via 
> OSC from the VST.
> 
> all best
> Øyvind
> 
> man. 10. jan. 2022 kl. 23:46 skrev joachim heintz  >:
> 
>     hi oeyvind -
> 
>     thanks for the detailed insights.  may i ask: what are you using as GUI?
> 
>     cheers -
>              joachim
> 
> 
>     On 10/01/2022 11:13, Oeyvind Brandtsegg wrote:
>      > Hi Susanne,
>      >
>      > Welcome to the community, and wonderful idea to combine Csound and
>      > Python! The two languages complement each other very nicely and
>     you will
>      > be able to build some very nice things with them together. You
>     can run
>      > Python as the main program and load Csound as a module (with
>     ctcsound)
>      > and this works with Python 3. No need to use Jupyter unless
>     you find it
>      > helpful. This is the most standard way of combining Csound and
>     Python,
>      > and will work well for most purposes.
>      >
>      > Another way is to run Csound as the main program and then access
>     Python
>      > via the py opcodes (e.g. pycall, pyrun etc), and this is probably
>     the
>      > reason why you thought that you needed Python 2 (as the py
>     opcodes are
>      > compiled for a specific Python version and have not yet been
>     updated for
>      > Python 3). There are some limitations with the py opcodes that
>     makes it
>      > slightly cumbersome to work with, so I would not recommend that
>     route
>      > unless you really need it.
>      >
>      > Yet another way that I have been using more and more is to run
>     the two
>      > programs as separate processes and just use OSC to communicate
>     between
>      > them. This can be useful for example if I wrap the Csound
>     instruments as
>      > VSTs to run in a DAW, and I do not want the Python interpreter to
>      > potentially interfere with the audio thread of the whole DAW.
>     Running
>      > Python as a server in the background allows Csound then to run very
>      > lightweight and only be taxed with producing audio in realtime, then
>      > Csound can poll the Python server for data values to use for note
>      > parameters and similar.
>      >
>      > As Francois mentioned, the ctcsound examples are a good place to
>     start.
>      > I just wanted to mention these other possibilities to fill out
>     the context.
>      >
>      > All best
>      > Øyvind Brandtsegg
>      >
>      > søn. 9. jan. 2022 kl. 22:44 skrev Susanne Pedersen
>      > 
>     >>:
>      >
>      >     Hi all,
>      >
>      >     I am new to both CSound and this list. I am also learning Python,
>      >     and would like to combine the two, once I become good enough at
>      >     both. However, I have a couple of questions at this point. I am
>      >     unsure if this is the correct list to ask these questions,
>     but I’ll
>      >     try. If they should be asked on the developer list, please
>     let me know.
>      >
>      >     My first question is, is there any particular reason that I
>     must use
>      >     Jupyter Notebooks, apart from the fact that the various
>     examples of
>      >     code are meant to be used with it? I’ll use it, if I
>     absolutely have
>      >     to, but I would prefer not to do so, if it is possible. As
>     far as I
>      >     can tell, the code can be written in any normal editor for
>     text or
>      >     code, and I even tried an example in the Python interactive
>      >     interpreter with success. So is Jupyter Notebooks really
>     necessary,
>      >     and if so, why?
>      >
>      >     My second question is about porting CSound to Work with
>     Python 3. I
>      >     know, it’s not a big deal for me to install Python 2.7, but I
>      >     personally think, it would be nicer to have only one version of
>      >     Python to Work with, especially if I want to distribute
>     programs, I
>      >     create, to others. The less stuff to install, the better in my
>      >     opinion. The Floss manual talks about a plugin, and I looked
>     at the
>      >     Github page, but I’m not sure what to do from there. Can anyone
>      >     explain how to actually use this plugin to port CSound? I have
>      >     always worked with Python 3, so I don’t have any prior experience
>      >     with porting from Python 2.
>      >
>      >     __ __
>      >
>      >     Thanks in advance,
>      >
>      >     Susanne Pedersen
>      >
>      >     __ __
>      >
>      >     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