gogins / csound-cxx-opcodes Goto Github PK
View Code? Open in Web Editor NEWThe "cxx" opcodes enable C++ code to be compiled and run in Csound orchestras.
License: GNU Lesser General Public License v2.1
The "cxx" opcodes enable C++ code to be compiled and run in Csound orchestras.
License: GNU Lesser General Public License v2.1
clang_hello.csd
.README.md
crystal clear.clang_example.csd
crystal clear, self-contained, spectacular, and foolproof. Strings, i-rates, k-rates, and a-rates should all be returned by clang_invoke
. It has to make music of some degree of interest.This will involve writing a simple C++ program that embeds two instances of Csound that run the clang_example.csd
piece at the same time.
To use the bundled libc++ please add the following LDFLAGS:
LDFLAGS="-L/opt/homebrew/opt/llvm/lib -Wl,-rpath,/opt/homebrew/opt/llvm/lib"
llvm is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
If you need to have llvm first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc
For compilers to find llvm you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
For submission to the arXiv and Computer Music Journal. Outstanding tasks:
clang_hello.csd
.Manuscripts are received with the understanding that they represent original material and are not being considered elsewhere for print or digital publication. Six months after being published in the Computer Music Journal, the articles may be posted online, subject to restrictions stated at LINK TBA.
I think this means I can share my code and examples but not the article. I can clarify that with the editor.
The article should refer to examples only via GitHub and thus should be submitted before the examples are finished.
Currently the Clang opcodes function very well but there is a potential future issue with Csound startup being delayed by compilation of embedded C++ code. I anticipate problems after about 2 to 4 thousand lines of C++ source code.
Making the JIT compiler multithreaded is the only simple way I know of to address this. I will try that.
When there are more than a hundred thousand lines in the message this gets way too slow. It's definitely slower than I think it should be, my computer should be able to handle millions of lines. This affects the use of the Clang opcodes which can generate large scores that have to go in this way.
I will profile/debug this with a custom C++ program.
This is caused by the behavior of the linking loader. Explicitly calling dlopen
or the equivalent for dependent dynamic link libraries, before loading the compiled module, resolves this issue.
cxx_compile
that will contain a list of dynamic link libraries to load in global scop, before loading the compiled module.Addong a title overrides the version title element in the /releases.atom feed making it not possible to parse the version number from it. I'd like to request that the release title is prefixed by the release version number, then I could aggregate releases to https://libreav.org
Make one or two short videos explaining to how to install and use the Clang opcodes. Should use a nifty but simple example.
But we need to release system resources and heap memory acquired by the ClangInvokable.
Reported by @vlazzarini.
The bug was caused by not actually setting the thread state from the thread parameter to clang_invoke
.
Benchmark, with statistical confidence tests, the performance of the following implementations of the Faust physically modeled guitar:
faust
compile to Csound architecture (plugin opcode).faustcompile
opcode to faustdsp
opcodefaust
compile to C++ and then use clang_compile
and clang_invoke
.Check out https://github.com/dribllerrad/temporary_file_handler
and others.
The LLVM people were no use in resolving the macOS bug so I have had enough of them. I will produce another version of these opcodes that use standard c/c++ toolchains to compile a temporary C++ file and load the resulting dynamic link library into Csound, finding and invoking functions as with the clang opcodes.
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.