Closed dxinteractive closed 4 years ago
Hmm, there may be deeper issues (or unrelated issues). I've found that faust2wasm -worklet noteplayer.dsp
doesn't produce a *.wasm file.
faust2wasm -worklet noteplayer.dsp
produces
Compiling with : -ftz 2
Compiled with 'wasm' backend in AudioWorklet mode
noteplayer.js, noteplayer-processor.js, testnoteplayer.html;
There doesn't seem to be a debug mode. I'll try a simpler *.dsp like the noise example.
faust2wasm work here:
faust2wasm -worklet noise.dsp
Compiling with : -ftz 2
Compiled with 'wasm' backend in AudioWorklet mode
noise.js, noise-processor.js, noise.wasm;
-emcc
is indeed deprecated.
Ok thanks, good to know, I'll ignore the -emcc
flag.
Running the noise.dsp
example I also don't get a .wasm file, but I found the issue. The faust2wasm
script I'm running is doing a rm -f $name.wasm
which removes the .wasm file after it's created, hence why I was not receiving it after the script completed. Up until now I was using the binaries from https://faust.grame.fr/downloads/index.html#macos "Latest pre-compiled binaries of the Faust compiler (Faust 2.14.4) for MaxOS (32/64 bits)". The code in that package has the behaviour I've been experiencing (Line 229, Faust-2.14.4/bin/faust2wasm)
Out of interest I've found the commit that at least removes that line. It means that 2.14.4 is older than I expected: https://github.com/grame-cncm/faust/commit/5bcfdfe76b2c6f37c7ccf5d5bae8ea3469517562#diff-a492dc53407c7f7534a492c808e44a78L223
Instead I cloned faust master branch from this repo and the issue is resolved.
Thanks for your help. Feel free to close, unless you'd like to repurpose this ticket to address the fact that this bug exists in the latest pre-compiled binary for OSX.
If I attempt to use the emscripten flag
-emcc
withfaust2wasm
, thenfaust2wasm
attempts to usefaust/webaudio/webaudio-asm.cpp
(orwebaudio-asm-poly.cpp
if in poly mode), neither of which appear to exist in the latest stable release of the faust compiler (2.14.4), or on the master branch of the faust repo.On my machine for instance I get this.
produces
The contents of the *.dsp file do not matter in this case.
I only used the
-emcc
out of curiosity to see how it works, so if it continues to not work or is deprecated I do not mind personally but thought I'd better report it, if nothing else to see if I'm using it wrong.