This repo is part of a larger project called Audio Anywhere(AA). Audio Anywhere a framework for working with audio plugins that are compiled once and run anywhere. At the heart of Audio Anywhere is an audio engine whose Digital Signal Processing (DSP) components are written in Faust and deployed with WebAssembly.
Details about the project can be found on the project's homepage.
This repo contains a number of AA module examples.
- Default is a do nothing module that can be loaded, well to do nothing
- Nuke is an analogue synth based on one of the Muses instruments
- VL1 is a fairly close emulation of the Casio VL-1. (Audio Anywhere standalone version pictured above.)
- Gain is a simple gain controller
- Reflect is a spring reverb emulation
- Muses Synth is the Muses Synth, which consists of the Nuke synth followed by Reflect reverb. This example demostrates Audio Anywhere audio graphs, where each DSP is a seperate WASM, but there is single UI.
- More in development
The example audio components are mostly implmented in Rust and compiled to WebAssembly. (Although it is planed to implemented at least one using C/C++.)
They currenlty make use of features only on nightly.
To install Rust go you need simply to install Rustup and if you already have Rust installed, then you can update with the command rustup update.
Now you need to install nightly:
rustup toolchain install nightly
Don't forget to update if you already have nightly installed. Now install the WASM target:
rustup target add wasm32-unknown-unknown --toolchain nightly
Each of the examples have a Cargo config that automatically compiles to WASM. (Later sections detail how to create your own example.)
Most interfaces are written in HTML5, with pure Javascript. To build some of the GUIs into a single HTML file Node.js is required.
All that said there is no requirement that each module is implemented in the same fashion, and as such to build a particular module see the corresponding readme in its directory.
An AA module must consist of the following:
- module.json is a description of the module, which is used to load it.
- module.wasm is an AA WASM API conforming module that implements the audio part of a module.
- module.html (optional) UI implemented in HTML5.
It is possible to deploy AA modules in a number of different forms, but currently the standalone application and VST 2.x plugin take basically the same approach. They assume that the modules are served via a websever, which for now requires that it is a single server, but this is not necessary. The root of the web-server contains the files in the directory root (it additionally contains some resources files):
- index.html code for the single page app of the interface;
- modules.json description of example modules that can be loaded;
- js Javascript files loaded by index.html and also by AA modules;
- css CSS loaded by index.html.
When a AA hosting application runs its interface is populated with index.html, and the set of modules is added to its module menu, which can be selected and loaded by the user. Additionally, a default module is loaded, as specified in modules.json.
Each module is assumed to have its own directory under the server root and contains the module bundle, as defined above.
A release can be built of existing AA modules and the AA hosting pages with the command:
./scripts/package.sh
This will create a directory, pkg, containing all the root files, plus bundles for each module in corresponding directories.
TODO
Once an example is implemented the following steps must be completed to ensure that is added correctly to a release:
- Add the module to modules.json so that a hosting application knows about the module;
- Add comamnds to copy the module bundle to package.sh so it is added when building a release.
© 2020 Benedict R. Gaster (cuberoo_)
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.