Open Smona opened 3 years ago
Which libfaust-wasm.js version are you using? Note that we have completely rewritten the Faust/WeAudio layer in the wasm2 branch, see https://github.com/grame-cncm/faust/tree/wasm2/javascript. This new code (still in test) is already packaged as an npm package. Thus it will be better to start from there.
Hello all! I'm very excited about the possibilities Faust creates when it comes to running custom DSP on the web for non-c++ programmers.
I'm trying to build a webpack loader for Faust DSP files. I've gotten it most of the way there, but unfortunately the version of libfaust provided by many package managers has some bugs in the AudioWorklet processor template.
I've been trying to figure out how to use libfaust-wasm in Node.js so I can package the compiler with the loader and make sure the version is correct. Unfortunately, when I try to run
libfaust-wasm.js
in a node environment, I get an error about preloaded memory only being supported in the browser and web workers. I got a bit stuck at that point becauselibfaust-wasm.js
is quite opaque, and admittedly c++ and its compilation aren't my strong suit.I was hoping that someone involved with the project would be interested in helping to create a version of libfaust-wasm that can be run in node. Ideally, it would support something like the following:
I really think supporting compilation from Nodejs would be a boon to Faust adoption, as it would enable integrating Faust compilation into all the various build tools used by application developers. I'd also be happy to provide help with any necessary planning or implementation! The part I need help with is just compiling and instantiating a version of libfaust that doesn't use preloaded memory.