Giter Club home page Giter Club logo

csound-wasm's People

Contributors

felixroos avatar gogins avatar padenot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

felixroos

csound-wasm's Issues

New version of ParametricLindenmayerSystem.js using CsoundAC.PITV instead of ChordSpaceGroup

  • Get the existing code to work in a cloud-5 piece. Problems... I'm not sure this actually ever worked in JavaScript. But it is working, I think my problem was a gigantic piece that would take a long time to compute.
  • There is a problem, the piano roll display is not working for this piece. It does work, that was a just a faux end event that I had put in, now removed.
  • Change from prototype-based classes to standard JavaScript classes?
  • Document these classes.
  • Remove all references to Silencio's ChordSpaceGroup and replace them with CsoundAC's PITV class, which has a less buggy implementation of chord spaces.
  • Test with a new version of an existing piece that uses ParametricLindenmayer.

Investigate other compilers/languages to WASM

  • Investigate Cheerp, an alternative to Emscripten. I see no reason change at this time, but keep an eye on this space.
  • Investigate Lisp/Scheme compilers. I especially want something that can run csound-extended-nudruz in the browser. I've been keeping a (very high level) eye on this possibility since I became aware of WebAssembly. It's not happening: (a) WASM community doesn't care; (b) no standard way of doing tail calls; (c) writing a CL runtime is hard.

Rebuild

After refactoring csound-extended, ensure that this repository builds, creates a release, and runs example pieces (which are in my csound-examples repository).

  • Builds.
  • Examples run.
  • Clarify build instructions and scripts.
  • Investigate publishing package to csound-examples etc.

licensing question

Thanks for this.
Does this wasm binary allows one to ship partially open source frontends which interface with this wasm binary?

Simplify build system and get it to build on macOS

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.

  • Remove the csound-extended submodule, we are now using the csound-ac submodule.
  • Remove the cmask submodule, it is now inside the csound-ac submodule.
  • Remove the boost submodule.
  • Remove the eigen submodule.
  • Remove the ./deps subdirectory and the script to build libsndfile, we will add a libsndfile submodule. We will get it to work, then patch it with a diff against upstream. Not doing, got old script to work.
  • Add the Csound plugins as a submodule? The only things I really need are the STK opcodes and the FluidSynth opcodes. Not doing at this time as involving additional dependencies and I can work without these.
  • Example/test that uses both Csound and CsoundAC.
  • Rationalise build scripts. Need to work on both Linux and macOS.

Embed HTML user interface layouts in Csound orchestra code

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:

  1. User interface label for that channel.
  2. Minimum value of the control.
  3. Maximum value of the control.

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.

Automatically enable audio on first clilck

Add this:

export function initAudioOnFirstClick() {
  document.addEventListener('click', function listener() {
    initAudio();
    document.removeEventListener('click', listener);
  });
}

Enable the insertion of CsoundAudioNode into an existing WebAudio graph (and vice versa)

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.