Skip to content

Files

Latest commit

f4c7d32 · Jan 24, 2020

History

History
This branch is 3296 commits behind csound/csound:develop.

Emscripten

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 31, 2019
Jan 31, 2018
Dec 3, 2019
Jul 14, 2018
May 6, 2018
May 8, 2018
Dec 3, 2019
Apr 26, 2018
Apr 21, 2018
Aug 1, 2019
May 31, 2019
Jan 31, 2018
Jan 24, 2020
May 3, 2018

WebAudio Csound

Authors: Steven Yi, Victor Lazzarini, Edward Costello

Introduction

These are the sources for WebAudio Csound, based on Web Assembly (WASM) and the Web Audio API. It supports the AudioWorklet interface if present, falling back to using ScriptProcessorNode otherwise. Csound is availble through the use of the CsoundObj API, or as an audio processor Node.

Requirements

  • Emscripten SDK/toolchain: install the Emscripten tools using these
    instructions thoroughly. Make sure all steps are followed to ensure a correct installation of the toolchain.
  • [JSDoc]](https://usejsdoc.org): if you are build a release package and/or documentation, you will need to install JSDoc.

Build Instructions

  1. First you will need to build libsndfile. Use the download_and_build_libsndfile.sh script. In the emscripten folder, run sh ./download_and_build_libsndfile.sh. This will create a deps folder, download libsndfile 1.0.25, unarchive the tarball, and then compile libsndfile with Emscripten.
  2. Run the build.sh script using sh ./build.sh. This will create a build folder (./dist), run cmake from there with the Csound source, then compile Csound with Emscripten, producing the WASM binaries and their JS interfaces.

At this point, the two .js files in the ./dist folder are all that are necessary to run Csound in a Web browser that supports WebAudio.

Release Instructions

This step builds a release package with the distribution files and documentation.

  1. Run sh build.sh
  2. Run sh update_example_libs_from_dist.sh
  3. Update CS_VERSION in build.sh if necessary
  4. Run sh release.sh

Acknowledgements

The original port of CsoundObj.js using ScriptProcessorNode to WASM support was contributed by Henri Manson.