Csound Csound-dev Csound-tekno Search About

[Csnd] csoundengine

Date2022-02-22 19:34
FromEduardo Moguillansky
Subject[Csnd] csoundengine

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1


Date2022-02-22 23:15
FromRichard van Bemmelen
SubjectRe: [Csnd] csoundengine
Looks great! But I could not pip install it on my Mac....

Richard

Op di 22 feb. 2022 om 20:34 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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-02-22 23:28
FromEduardo Moguillansky
SubjectRe: [Csnd] csoundengine

 Could you post the terminal output together with os and python versions to https://github.com/gesellkammer/csoundengine/issues?

Thanks for trying it out!

Eduardo

On 23.02.22 00:15, Richard van Bemmelen wrote:
Looks great! But I could not pip install it on my Mac....

Richard

Op di 22 feb. 2022 om 20:34 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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-02-23 04:56
FromForrest Curo
SubjectRe: [Csnd] csoundengine
This is looking truly far out! It's not that csound couldn't do a lot of this anyway; but it looks to be so much easier to set up & control!

On Tue, Feb 22, 2022 at 3:28 PM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

 Could you post the terminal output together with os and python versions to https://github.com/gesellkammer/csoundengine/issues?

Thanks for trying it out!

Eduardo

On 23.02.22 00:15, Richard van Bemmelen wrote:
Looks great! But I could not pip install it on my Mac....

Richard

Op di 22 feb. 2022 om 20:34 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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-02-23 07:59
FromRichard van Bemmelen
SubjectRe: [Csnd] csoundengine
OS X 10.13.4

(base) RMA-4:~ richard$ pip install csoundengine
ERROR: Could not find a version that satisfies the requirement csoundengine (from versions: none)
ERROR: No matching distribution found for csoundengine

Python 3.10.2


Op wo 23 feb. 2022 om 00:28 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

 Could you post the terminal output together with os and python versions to https://github.com/gesellkammer/csoundengine/issues?

Thanks for trying it out!

Eduardo

On 23.02.22 00:15, Richard van Bemmelen wrote:
Looks great! But I could not pip install it on my Mac....

Richard

Op di 22 feb. 2022 om 20:34 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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-02-23 09:15
FromFrancois PINOT
SubjectRe: [Csnd] csoundengine
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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-02-23 09:50
FromEduardo Moguillansky
SubjectRe: [Csnd] csoundengine

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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-02-23 10:17
FromRichard van Bemmelen
SubjectRe: [Csnd] csoundengine
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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-02-23 10:44
FromRichard van Bemmelen
SubjectRe: [Csnd] csoundengine
I did a brew reinstall python@3.9
But after that I got the same error with numpy.
It seems like installing python-dev requires Xcode to be installed, but I do not have that (requires too much HD space)

Op wo 23 feb. 2022 om 11:17 schreef Richard van Bemmelen <zappfinger@gmail.com>:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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-02-23 10:45
FromEduardo Moguillansky
SubjectRe: [Csnd] csoundengine

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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-02-23 10:50
FromEduardo Moguillansky
SubjectRe: [Csnd] csoundengine

1) csound 7 has not been released and is not supported

2) can you post the error?


On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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-02-23 10:54
FromFrancois PINOT
SubjectRe: [Csnd] csoundengine
>>> import csoundengine as ce
Checking dependencies
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.003s, CPU: 0.003s
csound plugins are not installed or are too old. I will try to install them now
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/dist-packages/csoundengine/__init__.py", line 98, in <module>
    ok = checkDependencies(force=False, tryfix=True)
  File "/usr/local/lib/python3.8/dist-packages/csoundengine/dependencies.py", line 279, in checkDependencies
    errormsg = _checkDependencies(tryfix=tryfix)
  File "/usr/local/lib/python3.8/dist-packages/csoundengine/dependencies.py", line 251, in _checkDependencies
    installPlugins()
  File "/usr/local/lib/python3.8/dist-packages/csoundengine/dependencies.py", line 226, in installPlugins
    zipped = downloadLatestPluginForPlatform()
  File "/usr/local/lib/python3.8/dist-packages/csoundengine/dependencies.py", line 107, in downloadLatestPluginForPlatform
    destFolder = _getDownloadsFolder()
  File "/usr/local/lib/python3.8/dist-packages/csoundengine/dependencies.py", line 164, in _getDownloadsFolder
    assert downloads.exists()
AssertionError
>>>

On my system, plugins are here: /usr/local/lib/csound/plugins64-7.0

François

 

Le mer. 23 févr. 2022 à 11:50, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

1) csound 7 has not been released and is not supported

2) can you post the error?


On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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-02-23 11:20
FromEduardo Moguillansky
SubjectRe: [Csnd] csoundengine

Thanks for the report. csoundengine checks that the external plugins are installed and if not attempts to install them. Here it attempted to download those plugins to your downloads folder but failed to find it

Update to latest version to see if this fixes it.

(pip install -U csoundengine)

On 23.02.22 11:54, Francois PINOT wrote:
>>> import csoundengine as ce
Checking dependencies
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.003s, CPU: 0.003s
csound plugins are not installed or are too old. I will try to install them now
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/dist-packages/csoundengine/__init__.py", line 98, in <module>
    ok = checkDependencies(force=False, tryfix=True)
  File "/usr/local/lib/python3.8/dist-packages/csoundengine/dependencies.py", line 279, in checkDependencies
    errormsg = _checkDependencies(tryfix=tryfix)
  File "/usr/local/lib/python3.8/dist-packages/csoundengine/dependencies.py", line 251, in _checkDependencies
    installPlugins()
  File "/usr/local/lib/python3.8/dist-packages/csoundengine/dependencies.py", line 226, in installPlugins
    zipped = downloadLatestPluginForPlatform()
  File "/usr/local/lib/python3.8/dist-packages/csoundengine/dependencies.py", line 107, in downloadLatestPluginForPlatform
    destFolder = _getDownloadsFolder()
  File "/usr/local/lib/python3.8/dist-packages/csoundengine/dependencies.py", line 164, in _getDownloadsFolder
    assert downloads.exists()
AssertionError
>>>

On my system, plugins are here: /usr/local/lib/csound/plugins64-7.0

François

 

Le mer. 23 févr. 2022 à 11:50, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

1) csound 7 has not been released and is not supported

2) can you post the error?


On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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-02-23 11:58
FromRichard van Bemmelen
SubjectRe: [Csnd] csoundengine
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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

Date2022-02-24 00:48
FromForrest Curo
SubjectRe: [Csnd] csoundengine
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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

Date2022-02-24 08:59
FromEduardo Moguillansky
SubjectRe: [Csnd] csoundengine

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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

Date2022-02-27 04:42
FromForrest Curo
SubjectRe: [Csnd] csoundengine
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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
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-02-27 17:40
FromForrest Curo
SubjectRe: [Csnd] csoundengine
So I installed csound 6.16.2
This time python3.9 complained that ctcsound was missing.
I installed python3-csound and get the same error.
(?)

On Sat, Feb 26, 2022 at 8:42 PM Forrest Curo <treegestalt@gmail.com> wrote:
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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
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-02-27 18:34
FromForrest Curo
SubjectRe: [Csnd] csoundengine
Okay, installed sphinx, which seems to have been the obstacle...

Eep:
>>> engine = Engine()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 731, in _startCsound
    if cs.version() < 6160:
TypeError: '<' not supported between instances of 'version' and 'int'


On Sun, Feb 27, 2022 at 9:40 AM Forrest Curo <treegestalt@gmail.com> wrote:
So I installed csound 6.16.2
This time python3.9 complained that ctcsound was missing.
I installed python3-csound and get the same error.
(?)

On Sat, Feb 26, 2022 at 8:42 PM Forrest Curo <treegestalt@gmail.com> wrote:
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session 1

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
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-02-28 09:19
FromEduardo Moguillansky
SubjectRe: [Csnd] csoundengine

To clarify some things:

* Csound 7 is not released and not supported. Use csound 6.17, which is the last release. Use the csound6 branch if building from source.
* I don't know what "python3-csound" is. csoundengine should install all its dependencies, even the external plugins needed.

If you need to install the dependencies yourself, you can do (from python 3.8, 3.9 or 3.10):

pip install risset
risset install "*"
pip install csoundengine

On 27.02.22 18:40, Forrest Curo wrote:
So I installed csound 6.16.2
This time python3.9 complained that ctcsound was missing.
I installed python3-csound and get the same error.
(?)

On Sat, Feb 26, 2022 at 8:42 PM Forrest Curo <treegestalt@gmail.com> wrote:
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session
                                                1

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
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-02-28 18:12
FromForrest Curo
SubjectRe: [Csnd] csoundengine
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound.git
...
forrest@beefurr:~/csound/cs6make$ sudo ldconfig
forrest@beefurr:~/csound/cs6make$ csound --version
--Csound version 7.0 (double samples) Feb 28 2022
[commit: 6353330bb7545afb3058b3bb24d4ac458e48893f]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s

On Mon, Feb 28, 2022 at 1:19 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

To clarify some things:

* Csound 7 is not released and not supported. Use csound 6.17, which is the last release. Use the csound6 branch if building from source.
* I don't know what "python3-csound" is. csoundengine should install all its dependencies, even the external plugins needed.

If you need to install the dependencies yourself, you can do (from python 3.8, 3.9 or 3.10):

pip install risset
risset install "*"
pip install csoundengine

On 27.02.22 18:40, Forrest Curo wrote:
So I installed csound 6.16.2
This time python3.9 complained that ctcsound was missing.
I installed python3-csound and get the same error.
(?)

On Sat, Feb 26, 2022 at 8:42 PM Forrest Curo <treegestalt@gmail.com> wrote:
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session
                                                1

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
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-02-28 18:15
FromForrest Curo
SubjectRe: [Csnd] csoundengine
Trying to git clone to any other csound branch gets me this sort of error:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound/tree/master.git
Cloning into 'master'...
remote: Please upgrade your git client.
remote: GitHub.com no longer supports git over dumb-http: https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-days
fatal: unable to access 'https://github.com/csound/csound/tree/master.git/': The requested URL returned error: 403
forrest@beefurr:~/csound$ git --version
git version 2.25.1

?

On Mon, Feb 28, 2022 at 10:12 AM Forrest Curo <treegestalt@gmail.com> wrote:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound.git
...
forrest@beefurr:~/csound/cs6make$ sudo ldconfig
forrest@beefurr:~/csound/cs6make$ csound --version
--Csound version 7.0 (double samples) Feb 28 2022
[commit: 6353330bb7545afb3058b3bb24d4ac458e48893f]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s

On Mon, Feb 28, 2022 at 1:19 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

To clarify some things:

* Csound 7 is not released and not supported. Use csound 6.17, which is the last release. Use the csound6 branch if building from source.
* I don't know what "python3-csound" is. csoundengine should install all its dependencies, even the external plugins needed.

If you need to install the dependencies yourself, you can do (from python 3.8, 3.9 or 3.10):

pip install risset
risset install "*"
pip install csoundengine

On 27.02.22 18:40, Forrest Curo wrote:
So I installed csound 6.16.2
This time python3.9 complained that ctcsound was missing.
I installed python3-csound and get the same error.
(?)

On Sat, Feb 26, 2022 at 8:42 PM Forrest Curo <treegestalt@gmail.com> wrote:
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session
                                                1

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
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-02-28 18:57
FromForrest Curo
SubjectRe: [Csnd] csoundengine
Successfully installed csoundengine-1.8.1
WARNING: You are using pip version 21.0.1; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/bin/python3.9 -m pip install --upgrade pip' command.
forrest@beefurr:~$ csound --version
0dBFS level = 32768.0
--Csound version 6.16 (double samples) Feb 28 2022
[commit: none]
libsndfile-1.0.28
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/__init__.py", line 103, in <module>
    from .engine import *
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/engine.py", line 124, in <module>
    import ctcsound
  File "/usr/local/lib/python3.9/dist-packages/ctcsound.py", line 423, in <module>
    libcsound.csoundCreateThread2.restype = ct.c_void_p
  File "/usr/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/libcsound64.so: undefined symbol: csoundCreateThread2
>>>



On Mon, Feb 28, 2022 at 10:15 AM Forrest Curo <treegestalt@gmail.com> wrote:
Trying to git clone to any other csound branch gets me this sort of error:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound/tree/master.git
Cloning into 'master'...
remote: Please upgrade your git client.
remote: GitHub.com no longer supports git over dumb-http: https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-days
fatal: unable to access 'https://github.com/csound/csound/tree/master.git/': The requested URL returned error: 403
forrest@beefurr:~/csound$ git --version
git version 2.25.1

?

On Mon, Feb 28, 2022 at 10:12 AM Forrest Curo <treegestalt@gmail.com> wrote:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound.git
...
forrest@beefurr:~/csound/cs6make$ sudo ldconfig
forrest@beefurr:~/csound/cs6make$ csound --version
--Csound version 7.0 (double samples) Feb 28 2022
[commit: 6353330bb7545afb3058b3bb24d4ac458e48893f]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s

On Mon, Feb 28, 2022 at 1:19 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

To clarify some things:

* Csound 7 is not released and not supported. Use csound 6.17, which is the last release. Use the csound6 branch if building from source.
* I don't know what "python3-csound" is. csoundengine should install all its dependencies, even the external plugins needed.

If you need to install the dependencies yourself, you can do (from python 3.8, 3.9 or 3.10):

pip install risset
risset install "*"
pip install csoundengine

On 27.02.22 18:40, Forrest Curo wrote:
So I installed csound 6.16.2
This time python3.9 complained that ctcsound was missing.
I installed python3-csound and get the same error.
(?)

On Sat, Feb 26, 2022 at 8:42 PM Forrest Curo <treegestalt@gmail.com> wrote:
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter Session
                                                1

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
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-02-28 19:24
FromEduardo Moguillansky
SubjectRe: [Csnd] csoundengine

Probably the version of ctcsound does not match the installed version of csound.

On 28.02.22 19:57, Forrest Curo wrote:
Successfully installed csoundengine-1.8.1
WARNING: You are using pip version 21.0.1; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/bin/python3.9 -m pip install --upgrade pip' command.
forrest@beefurr:~$ csound --version
0dBFS level = 32768.0
--Csound version 6.16 (double samples) Feb 28 2022
[commit: none]
libsndfile-1.0.28
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/__init__.py", line 103, in <module>
    from .engine import *
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/engine.py", line 124, in <module>
    import ctcsound
  File "/usr/local/lib/python3.9/dist-packages/ctcsound.py", line 423, in <module>
    libcsound.csoundCreateThread2.restype = ct.c_void_p
  File "/usr/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/libcsound64.so: undefined symbol: csoundCreateThread2
>>>



On Mon, Feb 28, 2022 at 10:15 AM Forrest Curo <treegestalt@gmail.com> wrote:
Trying to git clone to any other csound branch gets me this sort of error:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound/tree/master.git
Cloning into 'master'...
remote: Please upgrade your git client.
remote: GitHub.com no longer supports git over dumb-http: https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-days
fatal: unable to access 'https://github.com/csound/csound/tree/master.git/': The requested URL returned error: 403
forrest@beefurr:~/csound$ git --version
git version 2.25.1

?

On Mon, Feb 28, 2022 at 10:12 AM Forrest Curo <treegestalt@gmail.com> wrote:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound.git
...
forrest@beefurr:~/csound/cs6make$ sudo ldconfig
forrest@beefurr:~/csound/cs6make$ csound --version
--Csound version 7.0 (double samples) Feb 28 2022
[commit: 6353330bb7545afb3058b3bb24d4ac458e48893f]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s

On Mon, Feb 28, 2022 at 1:19 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

To clarify some things:

* Csound 7 is not released and not supported. Use csound 6.17, which is the last release. Use the csound6 branch if building from source.
* I don't know what "python3-csound" is. csoundengine should install all its dependencies, even the external plugins needed.

If you need to install the dependencies yourself, you can do (from python 3.8, 3.9 or 3.10):

pip install risset
risset install "*"
pip install csoundengine

On 27.02.22 18:40, Forrest Curo wrote:
So I installed csound 6.16.2
This time python3.9 complained that ctcsound was missing.
I installed python3-csound and get the same error.
(?)

On Sat, Feb 26, 2022 at 8:42 PM Forrest Curo <treegestalt@gmail.com> wrote:
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter
                                                          Session 1

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
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-02-28 20:51
FromForrest Curo
SubjectRe: [Csnd] csoundengine
/usr/local/lib/python3.9/dist-packages/ctcsound-6.17.1.dist-info
Yes.
So I went searching for csound 6.17, downloaded 'csound-csound6.zip' ended up with version 6.18
which worked all the way to:
>>> engine = Engine()

error: syntax error, unexpected T_IDENT  (token "inumouts")
 line 256:
 >>>     poly0 inumouts <<<
Unexpected untyped word poly0 when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure...

(Will see whether I can force #%$@%! github to git me 6.17)



On Mon, Feb 28, 2022 at 11:24 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Probably the version of ctcsound does not match the installed version of csound.

On 28.02.22 19:57, Forrest Curo wrote:
Successfully installed csoundengine-1.8.1
WARNING: You are using pip version 21.0.1; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/bin/python3.9 -m pip install --upgrade pip' command.
forrest@beefurr:~$ csound --version
0dBFS level = 32768.0
--Csound version 6.16 (double samples) Feb 28 2022
[commit: none]
libsndfile-1.0.28
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/__init__.py", line 103, in <module>
    from .engine import *
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/engine.py", line 124, in <module>
    import ctcsound
  File "/usr/local/lib/python3.9/dist-packages/ctcsound.py", line 423, in <module>
    libcsound.csoundCreateThread2.restype = ct.c_void_p
  File "/usr/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/libcsound64.so: undefined symbol: csoundCreateThread2
>>>



On Mon, Feb 28, 2022 at 10:15 AM Forrest Curo <treegestalt@gmail.com> wrote:
Trying to git clone to any other csound branch gets me this sort of error:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound/tree/master.git
Cloning into 'master'...
remote: Please upgrade your git client.
remote: GitHub.com no longer supports git over dumb-http: https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-days
fatal: unable to access 'https://github.com/csound/csound/tree/master.git/': The requested URL returned error: 403
forrest@beefurr:~/csound$ git --version
git version 2.25.1

?

On Mon, Feb 28, 2022 at 10:12 AM Forrest Curo <treegestalt@gmail.com> wrote:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound.git
...
forrest@beefurr:~/csound/cs6make$ sudo ldconfig
forrest@beefurr:~/csound/cs6make$ csound --version
--Csound version 7.0 (double samples) Feb 28 2022
[commit: 6353330bb7545afb3058b3bb24d4ac458e48893f]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s

On Mon, Feb 28, 2022 at 1:19 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

To clarify some things:

* Csound 7 is not released and not supported. Use csound 6.17, which is the last release. Use the csound6 branch if building from source.
* I don't know what "python3-csound" is. csoundengine should install all its dependencies, even the external plugins needed.

If you need to install the dependencies yourself, you can do (from python 3.8, 3.9 or 3.10):

pip install risset
risset install "*"
pip install csoundengine

On 27.02.22 18:40, Forrest Curo wrote:
So I installed csound 6.16.2
This time python3.9 complained that ctcsound was missing.
I installed python3-csound and get the same error.
(?)

On Sat, Feb 26, 2022 at 8:42 PM Forrest Curo <treegestalt@gmail.com> wrote:
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter
                                                          Session 1

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

Date2022-02-28 21:14
FromForrest Curo
SubjectRe: [Csnd] csoundengine
Downloaded the zip for csound-master, but I'm still getting the error at engine = Engine():

forrest@beefurr:~$ csound --version
--Csound version 6.17 (double samples) Feb 28 2022
[commit: none]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
>>> engine = Engine()

error: syntax error, unexpected T_IDENT  (token "inumouts")
 line 256:
 >>>     poly0 inumouts <<<
Unexpected untyped word poly0 when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure


On Mon, Feb 28, 2022 at 12:51 PM Forrest Curo <treegestalt@gmail.com> wrote:
/usr/local/lib/python3.9/dist-packages/ctcsound-6.17.1.dist-info
Yes.
So I went searching for csound 6.17, downloaded 'csound-csound6.zip' ended up with version 6.18
which worked all the way to:
>>> engine = Engine()

error: syntax error, unexpected T_IDENT  (token "inumouts")
 line 256:
 >>>     poly0 inumouts <<<
Unexpected untyped word poly0 when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure...

(Will see whether I can force #%$@%! github to git me 6.17)



On Mon, Feb 28, 2022 at 11:24 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Probably the version of ctcsound does not match the installed version of csound.

On 28.02.22 19:57, Forrest Curo wrote:
Successfully installed csoundengine-1.8.1
WARNING: You are using pip version 21.0.1; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/bin/python3.9 -m pip install --upgrade pip' command.
forrest@beefurr:~$ csound --version
0dBFS level = 32768.0
--Csound version 6.16 (double samples) Feb 28 2022
[commit: none]
libsndfile-1.0.28
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/__init__.py", line 103, in <module>
    from .engine import *
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/engine.py", line 124, in <module>
    import ctcsound
  File "/usr/local/lib/python3.9/dist-packages/ctcsound.py", line 423, in <module>
    libcsound.csoundCreateThread2.restype = ct.c_void_p
  File "/usr/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/libcsound64.so: undefined symbol: csoundCreateThread2
>>>



On Mon, Feb 28, 2022 at 10:15 AM Forrest Curo <treegestalt@gmail.com> wrote:
Trying to git clone to any other csound branch gets me this sort of error:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound/tree/master.git
Cloning into 'master'...
remote: Please upgrade your git client.
remote: GitHub.com no longer supports git over dumb-http: https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-days
fatal: unable to access 'https://github.com/csound/csound/tree/master.git/': The requested URL returned error: 403
forrest@beefurr:~/csound$ git --version
git version 2.25.1

?

On Mon, Feb 28, 2022 at 10:12 AM Forrest Curo <treegestalt@gmail.com> wrote:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound.git
...
forrest@beefurr:~/csound/cs6make$ sudo ldconfig
forrest@beefurr:~/csound/cs6make$ csound --version
--Csound version 7.0 (double samples) Feb 28 2022
[commit: 6353330bb7545afb3058b3bb24d4ac458e48893f]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s

On Mon, Feb 28, 2022 at 1:19 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

To clarify some things:

* Csound 7 is not released and not supported. Use csound 6.17, which is the last release. Use the csound6 branch if building from source.
* I don't know what "python3-csound" is. csoundengine should install all its dependencies, even the external plugins needed.

If you need to install the dependencies yourself, you can do (from python 3.8, 3.9 or 3.10):

pip install risset
risset install "*"
pip install csoundengine

On 27.02.22 18:40, Forrest Curo wrote:
So I installed csound 6.16.2
This time python3.9 complained that ctcsound was missing.
I installed python3-csound and get the same error.
(?)

On Sat, Feb 26, 2022 at 8:42 PM Forrest Curo <treegestalt@gmail.com> wrote:
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter
                                                          Session 1

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

Date2022-03-01 05:39
FromForrest Curo
SubjectRe: [Csnd] csoundengine
So I find:
255      poly0 inumouts, "outch", ichans, aunts
which is presumably
poly0 inum outs, "outch", ichans, aunts
but I don't recognize the syntax, or know where to find it in what file(?)

On Mon, Feb 28, 2022 at 1:14 PM Forrest Curo <treegestalt@gmail.com> wrote:
Downloaded the zip for csound-master, but I'm still getting the error at engine = Engine():

forrest@beefurr:~$ csound --version
--Csound version 6.17 (double samples) Feb 28 2022
[commit: none]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
>>> engine = Engine()

error: syntax error, unexpected T_IDENT  (token "inumouts")
 line 256:
 >>>     poly0 inumouts <<<
Unexpected untyped word poly0 when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure


On Mon, Feb 28, 2022 at 12:51 PM Forrest Curo <treegestalt@gmail.com> wrote:
/usr/local/lib/python3.9/dist-packages/ctcsound-6.17.1.dist-info
Yes.
So I went searching for csound 6.17, downloaded 'csound-csound6.zip' ended up with version 6.18
which worked all the way to:
>>> engine = Engine()

error: syntax error, unexpected T_IDENT  (token "inumouts")
 line 256:
 >>>     poly0 inumouts <<<
Unexpected untyped word poly0 when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure...

(Will see whether I can force #%$@%! github to git me 6.17)



On Mon, Feb 28, 2022 at 11:24 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Probably the version of ctcsound does not match the installed version of csound.

On 28.02.22 19:57, Forrest Curo wrote:
Successfully installed csoundengine-1.8.1
WARNING: You are using pip version 21.0.1; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/bin/python3.9 -m pip install --upgrade pip' command.
forrest@beefurr:~$ csound --version
0dBFS level = 32768.0
--Csound version 6.16 (double samples) Feb 28 2022
[commit: none]
libsndfile-1.0.28
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/__init__.py", line 103, in <module>
    from .engine import *
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/engine.py", line 124, in <module>
    import ctcsound
  File "/usr/local/lib/python3.9/dist-packages/ctcsound.py", line 423, in <module>
    libcsound.csoundCreateThread2.restype = ct.c_void_p
  File "/usr/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/libcsound64.so: undefined symbol: csoundCreateThread2
>>>



On Mon, Feb 28, 2022 at 10:15 AM Forrest Curo <treegestalt@gmail.com> wrote:
Trying to git clone to any other csound branch gets me this sort of error:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound/tree/master.git
Cloning into 'master'...
remote: Please upgrade your git client.
remote: GitHub.com no longer supports git over dumb-http: https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-days
fatal: unable to access 'https://github.com/csound/csound/tree/master.git/': The requested URL returned error: 403
forrest@beefurr:~/csound$ git --version
git version 2.25.1

?

On Mon, Feb 28, 2022 at 10:12 AM Forrest Curo <treegestalt@gmail.com> wrote:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound.git
...
forrest@beefurr:~/csound/cs6make$ sudo ldconfig
forrest@beefurr:~/csound/cs6make$ csound --version
--Csound version 7.0 (double samples) Feb 28 2022
[commit: 6353330bb7545afb3058b3bb24d4ac458e48893f]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s

On Mon, Feb 28, 2022 at 1:19 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

To clarify some things:

* Csound 7 is not released and not supported. Use csound 6.17, which is the last release. Use the csound6 branch if building from source.
* I don't know what "python3-csound" is. csoundengine should install all its dependencies, even the external plugins needed.

If you need to install the dependencies yourself, you can do (from python 3.8, 3.9 or 3.10):

pip install risset
risset install "*"
pip install csoundengine

On 27.02.22 18:40, Forrest Curo wrote:
So I installed csound 6.16.2
This time python3.9 complained that ctcsound was missing.
I installed python3-csound and get the same error.
(?)

On Sat, Feb 26, 2022 at 8:42 PM Forrest Curo <treegestalt@gmail.com> wrote:
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter
                                                          Session 1

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

Date2022-03-01 07:13
FromEduardo Moguillansky
SubjectRe: [Csnd] csoundengine

You seem to be missing the external plugins. This should have happened at installation. You can manually install the external plugins via:

risset install else klib poly


On 28.02.22 22:14, Forrest Curo wrote:
Downloaded the zip for csound-master, but I'm still getting the error at engine = Engine():

forrest@beefurr:~$ csound --version
--Csound version 6.17 (double samples) Feb 28 2022
[commit: none]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
>>> engine = Engine()

error: syntax error, unexpected T_IDENT  (token "inumouts")
 line 256:
 >>>     poly0 inumouts <<<
Unexpected untyped word poly0 when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure


On Mon, Feb 28, 2022 at 12:51 PM Forrest Curo <treegestalt@gmail.com> wrote:
/usr/local/lib/python3.9/dist-packages/ctcsound-6.17.1.dist-info
Yes.
So I went searching for csound 6.17, downloaded 'csound-csound6.zip' ended up with version 6.18
which worked all the way to:
>>> engine = Engine()

error: syntax error, unexpected T_IDENT  (token "inumouts")
 line 256:
 >>>     poly0 inumouts <<<
Unexpected untyped word poly0 when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure...

(Will see whether I can force #%$@%! github to git me 6.17)



On Mon, Feb 28, 2022 at 11:24 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Probably the version of ctcsound does not match the installed version of csound.

On 28.02.22 19:57, Forrest Curo wrote:
Successfully installed csoundengine-1.8.1
WARNING: You are using pip version 21.0.1; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/bin/python3.9 -m pip install --upgrade pip' command.
forrest@beefurr:~$ csound --version
0dBFS level = 32768.0
--Csound version 6.16 (double samples) Feb 28 2022
[commit: none]
libsndfile-1.0.28
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/__init__.py", line 103, in <module>
    from .engine import *
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/engine.py", line 124, in <module>
    import ctcsound
  File "/usr/local/lib/python3.9/dist-packages/ctcsound.py", line 423, in <module>
    libcsound.csoundCreateThread2.restype = ct.c_void_p
  File "/usr/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/libcsound64.so: undefined symbol: csoundCreateThread2
>>>



On Mon, Feb 28, 2022 at 10:15 AM Forrest Curo <treegestalt@gmail.com> wrote:
Trying to git clone to any other csound branch gets me this sort of error:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound/tree/master.git
Cloning into 'master'...
remote: Please upgrade your git client.
remote: GitHub.com no longer supports git over dumb-http: https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-days
fatal: unable to access 'https://github.com/csound/csound/tree/master.git/': The requested URL returned error: 403
forrest@beefurr:~/csound$ git --version
git version 2.25.1

?

On Mon, Feb 28, 2022 at 10:12 AM Forrest Curo <treegestalt@gmail.com> wrote:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound.git
...
forrest@beefurr:~/csound/cs6make$ sudo ldconfig
forrest@beefurr:~/csound/cs6make$ csound --version
--Csound version 7.0 (double samples) Feb 28 2022
[commit: 6353330bb7545afb3058b3bb24d4ac458e48893f]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s

On Mon, Feb 28, 2022 at 1:19 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

To clarify some things:

* Csound 7 is not released and not supported. Use csound 6.17, which is the last release. Use the csound6 branch if building from source.
* I don't know what "python3-csound" is. csoundengine should install all its dependencies, even the external plugins needed.

If you need to install the dependencies yourself, you can do (from python 3.8, 3.9 or 3.10):

pip install risset
risset install "*"
pip install csoundengine

On 27.02.22 18:40, Forrest Curo wrote:
So I installed csound 6.16.2
This time python3.9 complained that ctcsound was missing.
I installed python3-csound and get the same error.
(?)

On Sat, Feb 26, 2022 at 8:42 PM Forrest Curo <treegestalt@gmail.com> wrote:
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter
                                                          Session 1

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

Date2022-03-01 15:51
FromForrest Curo
SubjectRe: [Csnd] csoundengine
Just 'poly'; and now it works, yay!
However, the first example under Introduction did not compile until I changed:
     asig += vco2.a(kamp*0.7, kfreq + kdetune)
to      asig += vco2:a(kamp*0.7, kfreq + kdetune)

There was then a long delay after >>> event = engine.sched("synth", args=[48, 0.2, 3000, 4])
before I got any sound from it. A problem with my system's audio?
Or some initialization time needed?

On Mon, Feb 28, 2022 at 11:13 PM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

You seem to be missing the external plugins. This should have happened at installation. You can manually install the external plugins via:

risset install else klib poly


On 28.02.22 22:14, Forrest Curo wrote:
Downloaded the zip for csound-master, but I'm still getting the error at engine = Engine():

forrest@beefurr:~$ csound --version
--Csound version 6.17 (double samples) Feb 28 2022
[commit: none]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
>>> engine = Engine()

error: syntax error, unexpected T_IDENT  (token "inumouts")
 line 256:
 >>>     poly0 inumouts <<<
Unexpected untyped word poly0 when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure


On Mon, Feb 28, 2022 at 12:51 PM Forrest Curo <treegestalt@gmail.com> wrote:
/usr/local/lib/python3.9/dist-packages/ctcsound-6.17.1.dist-info
Yes.
So I went searching for csound 6.17, downloaded 'csound-csound6.zip' ended up with version 6.18
which worked all the way to:
>>> engine = Engine()

error: syntax error, unexpected T_IDENT  (token "inumouts")
 line 256:
 >>>     poly0 inumouts <<<
Unexpected untyped word poly0 when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure...

(Will see whether I can force #%$@%! github to git me 6.17)



On Mon, Feb 28, 2022 at 11:24 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Probably the version of ctcsound does not match the installed version of csound.

On 28.02.22 19:57, Forrest Curo wrote:
Successfully installed csoundengine-1.8.1
WARNING: You are using pip version 21.0.1; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/bin/python3.9 -m pip install --upgrade pip' command.
forrest@beefurr:~$ csound --version
0dBFS level = 32768.0
--Csound version 6.16 (double samples) Feb 28 2022
[commit: none]
libsndfile-1.0.28
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/__init__.py", line 103, in <module>
    from .engine import *
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/engine.py", line 124, in <module>
    import ctcsound
  File "/usr/local/lib/python3.9/dist-packages/ctcsound.py", line 423, in <module>
    libcsound.csoundCreateThread2.restype = ct.c_void_p
  File "/usr/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/libcsound64.so: undefined symbol: csoundCreateThread2
>>>



On Mon, Feb 28, 2022 at 10:15 AM Forrest Curo <treegestalt@gmail.com> wrote:
Trying to git clone to any other csound branch gets me this sort of error:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound/tree/master.git
Cloning into 'master'...
remote: Please upgrade your git client.
remote: GitHub.com no longer supports git over dumb-http: https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-days
fatal: unable to access 'https://github.com/csound/csound/tree/master.git/': The requested URL returned error: 403
forrest@beefurr:~/csound$ git --version
git version 2.25.1

?

On Mon, Feb 28, 2022 at 10:12 AM Forrest Curo <treegestalt@gmail.com> wrote:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound.git
...
forrest@beefurr:~/csound/cs6make$ sudo ldconfig
forrest@beefurr:~/csound/cs6make$ csound --version
--Csound version 7.0 (double samples) Feb 28 2022
[commit: 6353330bb7545afb3058b3bb24d4ac458e48893f]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s

On Mon, Feb 28, 2022 at 1:19 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

To clarify some things:

* Csound 7 is not released and not supported. Use csound 6.17, which is the last release. Use the csound6 branch if building from source.
* I don't know what "python3-csound" is. csoundengine should install all its dependencies, even the external plugins needed.

If you need to install the dependencies yourself, you can do (from python 3.8, 3.9 or 3.10):

pip install risset
risset install "*"
pip install csoundengine

On 27.02.22 18:40, Forrest Curo wrote:
So I installed csound 6.16.2
This time python3.9 complained that ctcsound was missing.
I installed python3-csound and get the same error.
(?)

On Sat, Feb 26, 2022 at 8:42 PM Forrest Curo <treegestalt@gmail.com> wrote:
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter
                                                          Session 1

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
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
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-03-01 17:50
FromEduardo Moguillansky
SubjectRe: [Csnd] csoundengine

There was a mistake from last update, where an event would be scheduled in relative mode instead of absolute, resulting in long latencies. Can you update csoundengine (pip install -U csoundengine) and try again?

On 01.03.22 16:51, Forrest Curo wrote:
Just 'poly'; and now it works, yay!
However, the first example under Introduction did not compile until I changed:
     asig += vco2.a(kamp*0.7, kfreq + kdetune)
to      asig += vco2:a(kamp*0.7, kfreq + kdetune)

There was then a long delay after >>> event = engine.sched("synth", args=[48, 0.2, 3000, 4])
before I got any sound from it. A problem with my system's audio?
Or some initialization time needed?

On Mon, Feb 28, 2022 at 11:13 PM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

You seem to be missing the external plugins. This should have happened at installation. You can manually install the external plugins via:

risset install else klib poly


On 28.02.22 22:14, Forrest Curo wrote:
Downloaded the zip for csound-master, but I'm still getting the error at engine = Engine():

forrest@beefurr:~$ csound --version
--Csound version 6.17 (double samples) Feb 28 2022
[commit: none]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
>>> engine = Engine()

error: syntax error, unexpected T_IDENT  (token "inumouts")
 line 256:
 >>>     poly0 inumouts <<<
Unexpected untyped word poly0 when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure


On Mon, Feb 28, 2022 at 12:51 PM Forrest Curo <treegestalt@gmail.com> wrote:
/usr/local/lib/python3.9/dist-packages/ctcsound-6.17.1.dist-info
Yes.
So I went searching for csound 6.17, downloaded 'csound-csound6.zip' ended up with version 6.18
which worked all the way to:
>>> engine = Engine()

error: syntax error, unexpected T_IDENT  (token "inumouts")
 line 256:
 >>>     poly0 inumouts <<<
Unexpected untyped word poly0 when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure...

(Will see whether I can force #%$@%! github to git me 6.17)



On Mon, Feb 28, 2022 at 11:24 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Probably the version of ctcsound does not match the installed version of csound.

On 28.02.22 19:57, Forrest Curo wrote:
Successfully installed csoundengine-1.8.1
WARNING: You are using pip version 21.0.1; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/bin/python3.9 -m pip install --upgrade pip' command.
forrest@beefurr:~$ csound --version
0dBFS level = 32768.0
--Csound version 6.16 (double samples) Feb 28 2022
[commit: none]
libsndfile-1.0.28
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/__init__.py", line 103, in <module>
    from .engine import *
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/engine.py", line 124, in <module>
    import ctcsound
  File "/usr/local/lib/python3.9/dist-packages/ctcsound.py", line 423, in <module>
    libcsound.csoundCreateThread2.restype = ct.c_void_p
  File "/usr/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/libcsound64.so: undefined symbol: csoundCreateThread2
>>>



On Mon, Feb 28, 2022 at 10:15 AM Forrest Curo <treegestalt@gmail.com> wrote:
Trying to git clone to any other csound branch gets me this sort of error:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound/tree/master.git
Cloning into 'master'...
remote: Please upgrade your git client.
remote: GitHub.com no longer supports git over dumb-http: https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-days
fatal: unable to access 'https://github.com/csound/csound/tree/master.git/': The requested URL returned error: 403
forrest@beefurr:~/csound$ git --version
git version 2.25.1

?

On Mon, Feb 28, 2022 at 10:12 AM Forrest Curo <treegestalt@gmail.com> wrote:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound.git
...
forrest@beefurr:~/csound/cs6make$ sudo ldconfig
forrest@beefurr:~/csound/cs6make$ csound --version
--Csound version 7.0 (double samples) Feb 28 2022
[commit: 6353330bb7545afb3058b3bb24d4ac458e48893f]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s

On Mon, Feb 28, 2022 at 1:19 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

To clarify some things:

* Csound 7 is not released and not supported. Use csound 6.17, which is the last release. Use the csound6 branch if building from source.
* I don't know what "python3-csound" is. csoundengine should install all its dependencies, even the external plugins needed.

If you need to install the dependencies yourself, you can do (from python 3.8, 3.9 or 3.10):

pip install risset
risset install "*"
pip install csoundengine

On 27.02.22 18:40, Forrest Curo wrote:
So I installed csound 6.16.2
This time python3.9 complained that ctcsound was missing.
I installed python3-csound and get the same error.
(?)

On Sat, Feb 26, 2022 at 8:42 PM Forrest Curo <treegestalt@gmail.com> wrote:
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter
                                                          Session 1

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
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
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-03-01 18:06
FromForrest Curo
SubjectRe: [Csnd] csoundengine
Much better!
Is this helpful?:
>>> event = engine.sched("synth", args=[48, 0.2, 3000, 4])
sched delay:  51.73466666666667
>>> engine.setp(event, 4, 50)
sched delay:  78.892
>>> engine.setp(event, 6, 1000, delay=4)
sched delay:  101.36666666666666
>>> engine.unsched(event)
>>> event = engine.sched("synth", args=[48, 0.2, 3000, 4])
sched delay:  172.03333333333333
>>> engine.unsched(event)
>>>

On Tue, Mar 1, 2022 at 9:50 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

There was a mistake from last update, where an event would be scheduled in relative mode instead of absolute, resulting in long latencies. Can you update csoundengine (pip install -U csoundengine) and try again?

On 01.03.22 16:51, Forrest Curo wrote:
Just 'poly'; and now it works, yay!
However, the first example under Introduction did not compile until I changed:
     asig += vco2.a(kamp*0.7, kfreq + kdetune)
to      asig += vco2:a(kamp*0.7, kfreq + kdetune)

There was then a long delay after >>> event = engine.sched("synth", args=[48, 0.2, 3000, 4])
before I got any sound from it. A problem with my system's audio?
Or some initialization time needed?

On Mon, Feb 28, 2022 at 11:13 PM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

You seem to be missing the external plugins. This should have happened at installation. You can manually install the external plugins via:

risset install else klib poly


On 28.02.22 22:14, Forrest Curo wrote:
Downloaded the zip for csound-master, but I'm still getting the error at engine = Engine():

forrest@beefurr:~$ csound --version
--Csound version 6.17 (double samples) Feb 28 2022
[commit: none]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
>>> engine = Engine()

error: syntax error, unexpected T_IDENT  (token "inumouts")
 line 256:
 >>>     poly0 inumouts <<<
Unexpected untyped word poly0 when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure


On Mon, Feb 28, 2022 at 12:51 PM Forrest Curo <treegestalt@gmail.com> wrote:
/usr/local/lib/python3.9/dist-packages/ctcsound-6.17.1.dist-info
Yes.
So I went searching for csound 6.17, downloaded 'csound-csound6.zip' ended up with version 6.18
which worked all the way to:
>>> engine = Engine()

error: syntax error, unexpected T_IDENT  (token "inumouts")
 line 256:
 >>>     poly0 inumouts <<<
Unexpected untyped word poly0 when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure...

(Will see whether I can force #%$@%! github to git me 6.17)



On Mon, Feb 28, 2022 at 11:24 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Probably the version of ctcsound does not match the installed version of csound.

On 28.02.22 19:57, Forrest Curo wrote:
Successfully installed csoundengine-1.8.1
WARNING: You are using pip version 21.0.1; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/bin/python3.9 -m pip install --upgrade pip' command.
forrest@beefurr:~$ csound --version
0dBFS level = 32768.0
--Csound version 6.16 (double samples) Feb 28 2022
[commit: none]
libsndfile-1.0.28
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/__init__.py", line 103, in <module>
    from .engine import *
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/engine.py", line 124, in <module>
    import ctcsound
  File "/usr/local/lib/python3.9/dist-packages/ctcsound.py", line 423, in <module>
    libcsound.csoundCreateThread2.restype = ct.c_void_p
  File "/usr/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/libcsound64.so: undefined symbol: csoundCreateThread2
>>>



On Mon, Feb 28, 2022 at 10:15 AM Forrest Curo <treegestalt@gmail.com> wrote:
Trying to git clone to any other csound branch gets me this sort of error:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound/tree/master.git
Cloning into 'master'...
remote: Please upgrade your git client.
remote: GitHub.com no longer supports git over dumb-http: https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-days
fatal: unable to access 'https://github.com/csound/csound/tree/master.git/': The requested URL returned error: 403
forrest@beefurr:~/csound$ git --version
git version 2.25.1

?

On Mon, Feb 28, 2022 at 10:12 AM Forrest Curo <treegestalt@gmail.com> wrote:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound.git
...
forrest@beefurr:~/csound/cs6make$ sudo ldconfig
forrest@beefurr:~/csound/cs6make$ csound --version
--Csound version 7.0 (double samples) Feb 28 2022
[commit: 6353330bb7545afb3058b3bb24d4ac458e48893f]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s

On Mon, Feb 28, 2022 at 1:19 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

To clarify some things:

* Csound 7 is not released and not supported. Use csound 6.17, which is the last release. Use the csound6 branch if building from source.
* I don't know what "python3-csound" is. csoundengine should install all its dependencies, even the external plugins needed.

If you need to install the dependencies yourself, you can do (from python 3.8, 3.9 or 3.10):

pip install risset
risset install "*"
pip install csoundengine

On 27.02.22 18:40, Forrest Curo wrote:
So I installed csound 6.16.2
This time python3.9 complained that ctcsound was missing.
I installed python3-csound and get the same error.
(?)

On Sat, Feb 26, 2022 at 8:42 PM Forrest Curo <treegestalt@gmail.com> wrote:
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter
                                                          Session 1

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
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
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-03-01 18:14
FromEduardo Moguillansky
SubjectRe: [Csnd] csoundengine

thanks for pointing it, removed

On 01.03.22 19:06, Forrest Curo wrote:
Much better!
Is this helpful?:
>>> event = engine.sched("synth", args=[48, 0.2, 3000, 4])
sched delay:  51.73466666666667
>>> engine.setp(event, 4, 50)
sched delay:  78.892
>>> engine.setp(event, 6, 1000, delay=4)
sched delay:  101.36666666666666
>>> engine.unsched(event)
>>> event = engine.sched("synth", args=[48, 0.2, 3000, 4])
sched delay:  172.03333333333333
>>> engine.unsched(event)
>>>

On Tue, Mar 1, 2022 at 9:50 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

There was a mistake from last update, where an event would be scheduled in relative mode instead of absolute, resulting in long latencies. Can you update csoundengine (pip install -U csoundengine) and try again?

On 01.03.22 16:51, Forrest Curo wrote:
Just 'poly'; and now it works, yay!
However, the first example under Introduction did not compile until I changed:
     asig += vco2.a(kamp*0.7, kfreq + kdetune)
to      asig += vco2:a(kamp*0.7, kfreq + kdetune)

There was then a long delay after >>> event = engine.sched("synth", args=[48, 0.2, 3000, 4])
before I got any sound from it. A problem with my system's audio?
Or some initialization time needed?

On Mon, Feb 28, 2022 at 11:13 PM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

You seem to be missing the external plugins. This should have happened at installation. You can manually install the external plugins via:

risset install else klib poly


On 28.02.22 22:14, Forrest Curo wrote:
Downloaded the zip for csound-master, but I'm still getting the error at engine = Engine():

forrest@beefurr:~$ csound --version
--Csound version 6.17 (double samples) Feb 28 2022
[commit: none]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
>>> engine = Engine()

error: syntax error, unexpected T_IDENT  (token "inumouts")
 line 256:
 >>>     poly0 inumouts <<<
Unexpected untyped word poly0 when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure


On Mon, Feb 28, 2022 at 12:51 PM Forrest Curo <treegestalt@gmail.com> wrote:
/usr/local/lib/python3.9/dist-packages/ctcsound-6.17.1.dist-info
Yes.
So I went searching for csound 6.17, downloaded 'csound-csound6.zip' ended up with version 6.18
which worked all the way to:
>>> engine = Engine()

error: syntax error, unexpected T_IDENT  (token "inumouts")
 line 256:
 >>>     poly0 inumouts <<<
Unexpected untyped word poly0 when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure...

(Will see whether I can force #%$@%! github to git me 6.17)



On Mon, Feb 28, 2022 at 11:24 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Probably the version of ctcsound does not match the installed version of csound.

On 28.02.22 19:57, Forrest Curo wrote:
Successfully installed csoundengine-1.8.1
WARNING: You are using pip version 21.0.1; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/bin/python3.9 -m pip install --upgrade pip' command.
forrest@beefurr:~$ csound --version
0dBFS level = 32768.0
--Csound version 6.16 (double samples) Feb 28 2022
[commit: none]
libsndfile-1.0.28
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
forrest@beefurr:~$ python3.9
Python 3.9.10 (main, Jan 15 2022, 18:17:56)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from csoundengine import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/__init__.py", line 103, in <module>
    from .engine import *
  File "/usr/local/lib/python3.9/dist-packages/csoundengine/engine.py", line 124, in <module>
    import ctcsound
  File "/usr/local/lib/python3.9/dist-packages/ctcsound.py", line 423, in <module>
    libcsound.csoundCreateThread2.restype = ct.c_void_p
  File "/usr/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/libcsound64.so: undefined symbol: csoundCreateThread2
>>>



On Mon, Feb 28, 2022 at 10:15 AM Forrest Curo <treegestalt@gmail.com> wrote:
Trying to git clone to any other csound branch gets me this sort of error:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound/tree/master.git
Cloning into 'master'...
remote: Please upgrade your git client.
remote: GitHub.com no longer supports git over dumb-http: https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-days
fatal: unable to access 'https://github.com/csound/csound/tree/master.git/': The requested URL returned error: 403
forrest@beefurr:~/csound$ git --version
git version 2.25.1

?

On Mon, Feb 28, 2022 at 10:12 AM Forrest Curo <treegestalt@gmail.com> wrote:
forrest@beefurr:~/csound$ git clone https://github.com/csound/csound.git
...
forrest@beefurr:~/csound/cs6make$ sudo ldconfig
forrest@beefurr:~/csound/cs6make$ csound --version
--Csound version 7.0 (double samples) Feb 28 2022
[commit: 6353330bb7545afb3058b3bb24d4ac458e48893f]
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.001s, CPU: 0.001s

On Mon, Feb 28, 2022 at 1:19 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

To clarify some things:

* Csound 7 is not released and not supported. Use csound 6.17, which is the last release. Use the csound6 branch if building from source.
* I don't know what "python3-csound" is. csoundengine should install all its dependencies, even the external plugins needed.

If you need to install the dependencies yourself, you can do (from python 3.8, 3.9 or 3.10):

pip install risset
risset install "*"
pip install csoundengine

On 27.02.22 18:40, Forrest Curo wrote:
So I installed csound 6.16.2
This time python3.9 complained that ctcsound was missing.
I installed python3-csound and get the same error.
(?)

On Sat, Feb 26, 2022 at 8:42 PM Forrest Curo <treegestalt@gmail.com> wrote:
Since my csound was out of date, I tried installing the latest version, got csound 7.0 running on ubuntu 20.04.
But that evidently doesn't work for this. Suggestions?

On python 3.9, I do:

>>> from csoundengine import Engine
and then
>>> engine = Engine()
gets me:

error: syntax error, unexpected STRING_TOKEN, expecting T_IDENT or T_TYPED_IDENT  (token """) line 68:
>>> <<<
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /tmp/csoundengine-jwvuyq7q.orc
001  
002  sr     = 48000
003  ksmps  = 64
004  nchnls = 2
...

...
645  schedule "__businit", 0, ksmps/sr
end of score.   overall amps:      0.0
  overall samples out of range:        0
0 errors in performance
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 586, in __init__
    self.start()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 847, in start
    self._startCsound()
  File "/home/forrest/.local/lib/python3.9/site-packages/csoundengine/engine.py", line 766, in _startCsound
    raise CsoundError(f"Error compiling base ochestra, error: {err}")
csoundengine.errors.CsoundError: Error compiling base ochestra, error: -1



On Thu, Feb 24, 2022 at 12:59 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Regarding midi, you can have csound handle midi directly, or you can handle midi on the python side and use it to schedule/control instruments.

Regarding the first option, you can pass any options when creating an engine to configure midi as you would in csound. For example

>>> e = csoundengine.Engine(commandlineOptions=['-+rtmidi=portmidi', '-Ma'])
>>> e.compile(r'''
instr 1
  ...
endin
''')
>>> e.compile("massign 1, 1")

For the second option, you can use any python library to interface with live midi. I would recommend rtmidi2: https://pypi.org/project/rtmidi2 (https://github.com/gesellkammer/rtmidi2)



On 24.02.22 01:48, Forrest Curo wrote:
I don't find any built-in midi interface... So I just import mido or something of the sort?

On Wed, Feb 23, 2022 at 3:58 AM Richard van Bemmelen <zappfinger@gmail.com> wrote:
Mac has no apt-get, so I tried installing with brew, but I got:

Error: No formulae found in taps.

Op wo 23 feb. 2022 om 11:46 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

apt-get install python3.9-dev


On 23.02.22 11:17, Richard van Bemmelen wrote:
I went back to Python 3.9.9, but I got this error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy

I could not pip install python-dev


Op wo 23 feb. 2022 om 10:50 schreef Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

Thanks for the catch. Fixed both in git and pypi. Python 3.10 is not supported yet since some dependencies have a broken ci build for 3.10.

On 23.02.22 10:15, Francois PINOT wrote:
Hello Eduardo,

I'm using Python 3.8.10 on Ubuntu 20.04. I get this error when importing csoundengine:

cannot import name 'cache' from 'functools'

It seems that cache is a new feature of  functools as of Python 3.9 only...

Regards

François

Le mar. 22 févr. 2022 à 20:34, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> a écrit :

Hi,

As a part of an effort to make working with csound in python less painful I created csoundengine (https://github.com/gesellkammer/csoundengine), a python library built on top of ctcsound and offering many simplifications and less bureaucracy. Particularly if you are using python from within a jupyter notebook, csoundengine will use many of the display and interaction possibilities provided there to offer a more ergonomic experience.

An introduction and documentation can be found here:

https://csoundengine.readthedocs.io/en/latest/index.html

Eduardo

Jupyter
                                                          Session 1

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