gesellkammer / csoundengine Goto Github PK
View Code? Open in Web Editor NEWA python library to control a csound process
License: GNU General Public License v3.0
A python library to control a csound process
License: GNU General Public License v3.0
Hello,
I was able to install csoundengine on my MacBook Pro (macOS 13.5.1) today and successfully import it in Python. However, when I create an Engine()
I get the following error:
>>> from csoundengine import *
>>> engine = Engine()
Asked for backend sr, but backend pa_cb, does nothave a fixed sr. Using sr=44100
error: syntax error, unexpected T_IDENT (token "dict_new")
line 14:
>>> gi__soundfontIndexes dict_new <<<
Unexpected untyped word gi__soundfontIndexes when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure
Error compiling base orchestra. A copy of the orchestra has been saved to /var/folders/lr/q0m4k0hx34q16lqv0x138d980000gn/T/csoundengine-lshfzgse.orc
When I run csound -z
in the command line I don't see dict_new
in the list. At the bottom of the opcodes list printout I see these warnings:
WARNING: could not open library '/Users/hallenj/Library/csound/6.0/plugins64/libjsfx.dylib' (-1)
WARNING: could not open library '/Users/hallenj/Library/csound/6.0/plugins64/libpathtools.dylib' (-1)
WARNING: could not open library '/Users/hallenj/Library/csound/6.0/plugins64/libelse.dylib' (-1)
WARNING: could not open library '/Users/hallenj/Library/csound/6.0/plugins64/libbeosc.dylib' (-1)
WARNING: could not open library '/Users/hallenj/Library/csound/6.0/plugins64/libcsound_webserver.dylib' (-1)
WARNING: could not open library '/Users/hallenj/Library/csound/6.0/plugins64/librisset.dylib' (-1)
WARNING: could not open library '/Users/hallenj/Library/csound/6.0/plugins64/libklib.dylib' (-1)
WARNING: could not open library '/Users/hallenj/Library/csound/6.0/plugins64/libsndmeta.dylib' (-1)
WARNING: could not open library '/Users/hallenj/Library/csound/6.0/plugins64/libpoly.dylib' (-1)
Csound clearly knows to look in this directory and load the libraries, but apparently it can't open them. Is this a permissions issue? Do you have any suggestions for what I could try?
Thanks!
Jason
Hi Eduardo,
About one out of 100 times that I run csoundengine my program crashes and gives me this error:
Traceback (most recent call last):
File "/Users/hallenj/Documents/csound/aya/aya.py", line 1922, in <module>
main()
File "/Users/hallenj/Documents/csound/aya/aya.py", line 1903, in main
window = MainWindow()
^^^^^^^^^^^^
File "/Users/hallenj/Documents/csound/aya/aya.py", line 63, in __init__
self.initialize_csound()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hallenj/Documents/csound/aya/aya.py", line 126, in initialize_csound
self.cs = CsoundThread()
^^^^^^^^^^^^^^
File "/Users/hallenj/Documents/csound/aya/csoundthread.py", line 24, in __init__
self.session = ce.Engine(nchnls=1, backend = "auhal", ksmps=64, buffersize=256, numbuffers=4, outdev="dac0", globalcode = half_sine_table).session()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hallenj/miniconda3/envs/csound/lib/python3.11/site-packages/csoundengine/engine.py", line 1829, in session
self._session = Session(self.name)
^^^^^^^^^^^^^^^^^^
File "/Users/hallenj/miniconda3/envs/csound/lib/python3.11/site-packages/csoundengine/session.py", line 436, in __init__
bucketSizes = [int(size) for size in bucketSizeCurve.map(numpriorities)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hallenj/miniconda3/envs/csound/lib/python3.11/site-packages/csoundengine/session.py", line 436, in <listcomp>
bucketSizes = [int(size) for size in bucketSizeCurve.map(numpriorities)]
^^^^^^^^^
ValueError: cannot convert float NaN to integer
Exiting python, closing all active engines
... stopping engine0
Any idea why this is happening?
Thanks,
Jason
Hi Eduardo,
There seems to be a bug here: https://github.com/gesellkammer/csoundengine/blob/master/csoundengine/engine.py#L1760. The correct mode to turn off only the exact match is 4.
Thanks!
Jason
Hi Eduardo,
There seems to be a bug at https://github.com/gesellkammer/csoundengine/blob/master/csoundengine/session.py#L503. I believe the logic should be if synth.instr.instrFreesParamTable
.
Thanks,
Jason
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.