gogins / csound-wasm Goto Github PK
View Code? Open in Web Editor NEWWebAssembly modules for Csound and CsoundAC.
License: Other
WebAssembly modules for Csound and CsoundAC.
License: Other
This method exists in csound.hpp
and in jcsound.cpp
, so should exist here as well.
After refactoring csound-extended, ensure that this repository builds, creates a release, and runs example pieces (which are in my csound-examples repository).
Done.
Thanks for this.
Does this wasm binary allows one to ship partially open source frontends which interface with this wasm binary?
We don't need to build with GitHub Actions. Our end product is an archive ready to go after unzipping, both on localhost and on the open Internet. It's enough if it builds on macOS and Linux.
The objective is to not have to rewrite UI code when Csound instruments are reused. Instead, a script will read the Csound orchestra code and write out the user interface elements specified therein. Only the following metadata needs to be embedded in the Csound orchestra code:
Then, reusable JavaScript code will parse this data out from the Csound orchestra, and dynamically create user interface elements and handlers for these channels, which will be inserted into the DOM within a <div id="csoundui">
. These elements will have unique classes that can be styled, and the containing <div>
will have a vertical linear layout with a scrollbar.
The existing control channel declarations and definitions should remain and should be used.
The same metadata should serve as well for user interfaces implemented using dat.gui.
The CSS classes to be used by the script will be csorc
, csinstr
, and cschannel
.
Add this:
export function initAudioOnFirstClick() {
document.addEventListener('click', function listener() {
initAudio();
document.removeEventListener('click', listener);
});
}
Currently, in csound_loader.js
:
csound_message_callback_("Trying to load CsoundAudioNode...\n");
var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioContext = new AudioContext();
await audioContext.audioWorklet.addModule('CsoundAudioProcessor.js').then(function() {
csound_message_callback_("Creating CsoundAudioNode...\n");
csound_audio_node = new CsoundAudioNode(audioContext, csound_message_callback_);
csound_is_loaded = true;
csound_message_callback_("CsoundAudioNode (AudioWorklet) is available in this JavaScript context.\n");
}, function(error) {
csound_message_callback_(error + '\n');
});
There could be thus an overload of get_csound(csound_message_callback)
, e.g. `get_csound(csound_message_callback, audio_context)
Also, check how `@csound/browser` works.
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.