Closed dxinteractive closed 4 years ago
Ok, I partially solved this.
faust2nodejs
is based on faust2api
, so I tried faust2api
directly.
Unlike faust2nodejs
, it displayed errors when it failed to build.
faust2api -coreaudio soundtest.dsp
Your dsp-faust.zip API package for CoreAudio is being created
/Users/damienclarke/faust/Faust-2.14.4/bin/faust2api: line 380: pkg-config: command not found
env: python2: No such file or directory
I installed pkg-config
using brew install pkg-config
, tried again, and the error progressed to this:
Your dsp-faust.zip API package for CoreAudio is being created
Package sndfile was not found in the pkg-config search path.
Perhaps you should add the directory containing `sndfile.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sndfile' found
env: python2: No such file or directory
I installed libsndfile
by running brew install libsndfile
, and it appeared to create the intended zip file, although with a few warnings*:
Your dsp-faust.zip API package for CoreAudio is being created
ld: warning: directory not found for option '-L/usr/local/Cellar/flac/1.3.2/lib'
ld: warning: directory not found for option '-L/usr/local/Cellar/libogg/1.3.2/lib'
ld: warning: directory not found for option '-L/usr/local/Cellar/libvorbis/1.3.5_1/lib'
env: python2: No such file or directory
(*It seems these same warnings pop up in #192 and #364, but I cannot yet determine if they actually matter)
I didn't try to see if the contents of the zip file worked as I haven;t set my machine up for cpp development. Ignoring those warnings for now, I tried faust2nodejs -coreaudio -soundfile soundtest.dsp
and it worked this time. Still haven't tried using soundfile
in the dsp yet.
I guess the focus of this issue could now be on the second original point - Is it normal that the process should not produce any terminal output when something like this hasn't worked correctly?
Have tried using soundfile
now with the following dsp script:
import("stdfaust.lib");
process = 0,_~+(1):soundfile("son[url:{'A4.ogg'}]",2):!,!,_,_;
And this works! Running the *.node
file produced by faust2nodejs -coreaudio -soundfile soundtest.dsp
plays the sound A4.ogg
.
faust2nodejs
has a -debug
option. Have you tried it to see if it properly display error messages in case of failure?
Hi sletz, I'll reproduce the original situation and give that a go, thanks.
Keep up the great work with Faust by the way, I'm very impressed by it.
Hi, haven't got around to this and likely wont for a while, feel free to close.
I have FAUST Version 2.14.4 on macOS High Sierra 10.13.6 I have
soundtest.dsp
with the following contents:It does not actually use
soundfile
yet, but I intend to add this later.When I run
faust2nodejs -coreaudio soundtest.dsp
, it producessoundtest.node
, prints"A native nodejs node "soundtest.node" was generated in the current folder."
to the terminal, and the file works as intended.When I run
faust2nodejs -coreaudio -soundfile soundtest.dsp
, it produces a directory calledsoundtest-faustnode
filed with.h
and.cpp
files and prints nothing to the console. I assume that this directory is created as part of the compilation process and is left over.faust2nodejs -help
says that-soundfile
should work as it is "inherited directly from faust2api".ShouldThis was fixed, see comments.-soundfile
work withfaust2nodejs
, is the help file wrong, or is it a problem with my setup?Thanks