faust -lang js foo.dsp
faust -lang js -a webaudio.js freeverb.dsp -o freeverb.js
in examples folder to compile all html pages from Faust dsp.
The tool faust2webaudio can also be used to compile a Web Audio API html page from .dsp files, like :
Faust audio nodes then can also be "combined" directly using the WebAudio API, as demonstrated in webaudio-loader.html architecture file, where a karplus effect is sent in a freeverb.
Because WebAudio API still does not have access to audio inputs, we just allow the user to load a sound file to be processed by the Faust effects (see the Soundfile button at the bottom of the generated page, the loaded file is supposed to be located in the same folder of the html web page)
Note that Chrome cannot access local files for some obscure security reason, so you'll have to open it with the --allow-file-access-from-files parameter, like the following on OSX:
open "/Applications/Google Chrome.app" --args --allow-file-access-from-files
An online example of Karplus can be tested here.
- noise and osc generators still do not work correctly.
- implemented UI elements are : sliders, (but all will be displayed horizontally) buttons and num entries.
- layout is currently quite basic.