[Csnd] ctcsound..
Date | 2018-09-20 21:37 |
From | Rory Walsh |
Subject | [Csnd] ctcsound.. |
I'm having issues with ctcsound on Linux. I just can't get it to play ball. Here's the output: >>> import ctcsound Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/rory/.local/lib/python2.7/site-packages/ctcsound.py", line 2560, in <module> libcspt.NewCsoundPT.restype = c_void_p File "/usr/lib/python2.7/ctypes/__init__.py", line 375, in __getattr__ func = self.__getitem__(name) File "/usr/lib/python2.7/ctypes/__init__.py", line 380, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: libcsnd6.so: undefined symbol: NewCsoundPT I just built from the dev branch? I will try from the master branch and see if that's any better.. |
Date | 2018-09-21 08:04 |
From | Francois PINOT |
Subject | Re: [Csnd] ctcsound.. |
Hello Rory, I just built on linux (Ubuntu 16.04) from the develop branch and I could not reproduce your problem. Maybe there's an old version of libcsnd6.so remaining somewhere in your system? François Le jeu. 20 sept. 2018 à 22:38, Rory Walsh <rorywalsh@ear.ie> a écrit :
|
Date | 2018-09-21 16:24 |
From | Rory Walsh |
Subject | Re: [Csnd] ctcsound.. |
>>> import ctcsound Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/walshr/Library/Python/2.7/lib/python/site-packages/ctcsound.py", line 33, in <module> libcsound = CDLL("CsoundLib64.framework/CsoundLib64") File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__ self._handle = _dlopen(self._name, mode) OSError: dlopen(CsoundLib64.framework/CsoundLib64, 6): image not found I fail to see how it can't find the image when running Csound from the command line works just fine. On Fri, 21 Sep 2018 at 08:05, Francois PINOT <fggpinot@gmail.com> wrote:
|
Date | 2018-09-21 17:35 |
From | Francois PINOT |
Subject | Re: [Csnd] ctcsound.. |
Is CsoundLib64 in the right place on your system? Le ven. 21 sept. 2018 à 17:25, Rory Walsh <rorywalsh@ear.ie> a écrit :
|
Date | 2018-09-21 17:40 |
From | Victor Lazzarini |
Subject | Re: [Csnd] ctcsound.. |
I think the ctcsound.py is not the one installed by the installer, but a manually installed with make install.
The installer places things in /Library/Python
and not in ~/Library/Python.
Remove that file and try again
Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland
|
Date | 2018-09-21 18:45 |
From | Rory Walsh |
Subject | Re: [Csnd] ctcsound.. |
Thanks guys I'll try that. Next up Windows! On Fri 21 Sep 2018, 17:40 Victor Lazzarini, <Victor.Lazzarini@mu.ie> wrote:
|
Date | 2018-09-21 20:20 |
From | Rory Walsh |
Subject | Re: [Csnd] ctcsound.. |
Works out of the box on Windows. There's a first. On Fri, 21 Sep 2018 at 18:45, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2018-09-21 20:52 |
From | Rory Walsh |
Subject | Re: [Csnd] ctcsound.. |
It's importing Ok, but the following script: returns the following error: 0dBFS level = 32768.0 --Csound version 6.11 (double samples) May 9 2018 [commit: 9b981ce5160313175575b24cddb513ab322b5815] libsndfile-1.0.29pre1 graphics suppressed, ascii substituted 0dBFS level = 32768.0 orch now loaded audio buffered in 4096 sample-frame blocks not writing to sound disk SECTION 1: Traceback (most recent call last): File ".\vco2.py", line 15, in <module> spout = cs.spout() File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 1208, in spout return np.ctypeslib.as_array(p) File "C:\Users\rory\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\ctypeslib.py", line 363, in as_array return array(obj, copy=False) ValueError: '<P' is not a valid PEP 3118 buffer format string inactive allocs returned to freespace 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.018s, CPU: 0.018s no sound written to disk Any ideas? On Fri, 21 Sep 2018 at 20:20, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2018-09-21 21:00 |
From | Rory Walsh |
Subject | Re: [Csnd] ctcsound.. |
I tried earlier versions of Python 3 but I still get the same error. On Fri, 21 Sep 2018 at 20:52, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2018-09-21 21:07 |
From | Francois PINOT |
Subject | Re: [Csnd] ctcsound.. |
Which version of Numpy? It seems it's a known bug between numpy and ctypes. See https://github.com/toinsson/pyrealsense/issues/82. I had recently this issue on a linux ubuntu 18.04 system. I installed anaconda and this solved the problem. What puzzled me was that this bug was referenced in 2013. It seems it re-appeared in recent versions of ctypes. Le ven. 21 sept. 2018 à 21:52, Rory Walsh <rorywalsh@ear.ie> a écrit :
|
Date | 2018-09-21 21:15 |
From | Rory Walsh |
Subject | Re: [Csnd] ctcsound.. |
'1.15.1' I just did a pip install numpy after installing Python3.. On Fri, 21 Sep 2018 at 21:07, Francois PINOT <fggpinot@gmail.com> wrote:
|
Date | 2018-09-21 21:26 |
From | Francois PINOT |
Subject | Re: [Csnd] ctcsound.. |
That's what I did on my ubuntu 18.04 system and I got the problem. Then I installed Anaconda... Le ven. 21 sept. 2018 à 22:15, Rory Walsh <rorywalsh@ear.ie> a écrit :
|
Date | 2018-09-21 21:29 |
From | Victor Lazzarini |
Subject | Re: [Csnd] ctcsound.. |
python 3 instead of 2.7?
Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland
|
Date | 2018-09-21 21:34 |
From | Rory Walsh |
Subject | Re: [Csnd] ctcsound.. |
I'll give that a go On Fri 21 Sep 2018, 21:26 Francois PINOT, <fggpinot@gmail.com> wrote:
|
Date | 2018-09-21 21:44 |
From | Francois PINOT |
Subject | Re: [Csnd] ctcsound.. |
On a recent ubuntu 18.04 system I used the python2.7.15 and python3.6.5 shipped with the system and I installed numpy using pip for both versions of Python. I got the "p' is not a valid pep 3118 buffer format string" problem with python2.7 and python3.6 as well. I then uninstalled numpy and installed Anaconda and got ctcsound working with both versions of Python from Anaconda. Le ven. 21 sept. 2018 à 22:29, Victor Lazzarini <Victor.Lazzarini@mu.ie> a écrit :
|
Date | 2018-09-21 21:55 |
From | Victor Lazzarini |
Subject | Re: [Csnd] ctcsound.. |
I see you are using Python 3. Must be a numpy issue with ctcsound
Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland
|
Date | 2018-09-21 21:57 |
From | Rory Walsh |
Subject | Re: [Csnd] ctcsound.. |
I'm running Python 3 Victor. I'll give anaconda a shot. On Fri 21 Sep 2018, 21:34 Rory Walsh, <rorywalsh@ear.ie> wrote:
|
Date | 2018-09-21 22:06 |
From | Victor Lazzarini |
Subject | Re: [Csnd] ctcsound.. |
I think the problem does not appear on OSX. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland
|
Date | 2018-09-21 22:22 |
From | Rory Walsh |
Subject | Re: [Csnd] ctcsound.. |
Thanks I'll try OSX again on Monday. On Fri 21 Sep 2018, 22:06 Victor Lazzarini, <Victor.Lazzarini@mu.ie> wrote:
|
Date | 2018-09-21 23:44 |
From | Rory Walsh |
Subject | Re: [Csnd] ctcsound.. |
I just installed anaconda on Windows, but still get the same error: 0dBFS level = 32768.0 --Csound version 6.11 (double samples) May 9 2018 [commit: 9b981ce5160313175575b24cddb513ab322b5815] libsndfile-1.0.29pre1 graphics suppressed, ascii substituted 0dBFS level = 32768.0 orch now loaded audio buffered in 4096 sample-frame blocks not writing to sound disk SECTION 1: Traceback (most recent call last): File "vco2.py", line 16, in <module> spout = cs.spout() File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 1208, in spout return np.ctypeslib.as_array(p) File "C:\Users\rory\Miniconda3\lib\site-packages\numpy\ctypeslib.py", line 363, in as_array return array(obj, copy=False) ValueError: '<P' is not a valid PEP 3118 buffer format string inactive allocs returned to freespace 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.039s, CPU: 0.039s no sound written to disk Looks like it also installs '1.15.1' On Fri, 21 Sep 2018 at 22:22, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2018-09-22 00:17 |
From | Marc Demers |
Subject | Re: [Csnd] ctcsound.. |
From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Rory Walsh <rorywalsh@EAR.IE>
Sent: Friday, September 21, 2018 6:44:45 PM To: CSOUND@LISTSERV.HEANET.IE Subject: Re: [Csnd] ctcsound.. I just installed anaconda on Windows, but still get the same error:
0dBFS level = 32768.0
--Csound version 6.11 (double samples) May 9 2018 [commit: 9b981ce5160313175575b24cddb513ab322b5815] libsndfile-1.0.29pre1 graphics suppressed, ascii substituted 0dBFS level = 32768.0 orch now loaded audio buffered in 4096 sample-frame blocks not writing to sound disk SECTION 1: Traceback (most recent call last): File "vco2.py", line 16, in <module> spout = cs.spout() File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 1208, in spout return np.ctypeslib.as_array(p) File "C:\Users\rory\Miniconda3\lib\site-packages\numpy\ctypeslib.py", line 363, in as_array return array(obj, copy=False) ValueError: '<P' is not a valid PEP 3118 buffer format string inactive allocs returned to freespace 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.039s, CPU: 0.039s no sound written to disk Looks like it also installs '1.15.1'
On Fri, 21 Sep 2018 at 22:22, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2018-09-22 04:54 |
From | Francois PINOT |
Subject | Re: [Csnd] ctcsound.. |
when you run the python command does it say that it is the python from anaconda? Something like that: Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56) Le sam. 22 sept. 2018 à 00:45, Rory Walsh <rorywalsh@ear.ie> a écrit :
|
Date | 2018-09-22 07:22 |
From | Francois PINOT |
Subject | Re: [Csnd] ctcsound.. |
I did some test on my Ubuntu 18.04 system. I removed Anaconda. So I was left with the distro packages for Python2.7.15 and Python3.6.6 (the defaults when you install Ubuntu 18.04). I then installed numpy and matplotlib from the Ubuntu packages and could run vco2.py. Then I removed the numpy and matplotlib ubuntu packages and reinstalled numpy and matplotlib through the pip command. With this configuration, vco2.py failed with the '<P' is not a valid PEP 3118 buffer format string error. So it seems that the bug appears when ctypes which is part of the python package and numpy weren't built with the same tools. That's annoying because it means we cannot use the latest version of numpy when using a python package from the official distro. I will investigate to find a workaround and let you know if I succeed. François Le sam. 22 sept. 2018 à 05:54, Francois PINOT <fggpinot@gmail.com> a écrit :
|
Date | 2018-09-22 09:44 |
From | Victor Lazzarini |
Subject | Re: [Csnd] ctcsound.. |
I’ve confirmed that now. The vco2.py file continues to run here with no problems. ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 21 Sep 2018, at 22:22, Rory Walsh |
Date | 2018-09-22 13:49 |
From | Rory Walsh |
Subject | Re: [Csnd] ctcsound.. |
Following Marc's suggestion, I install ActivePython here on Windows and it's all working fine now. I'll get back to Linux and OSX in the coming days and let you know. On Sat, 22 Sep 2018 at 09:45, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote: I’ve confirmed that now. The vco2.py file continues to run here with no problems. |