Looking over the C++ that Faust generates, it seems that constants are
always single precision, regardless of the translation options.  I
appreciate that the input and output samples are aways going to be single
precision, but there are times when it would be useful to have greater
precision internally, say the coefficients in a biquad IIR filter when the
cutoff frequency is much lower than the sample rate.

To illustrate, the program:

process = _: *(1/9) :_;


with no options compiles to:

output0[i] = FAUSTFLOAT((0.111111f * float(input0[i])));


with -double compiles to:

output0[i] = FAUSTFLOAT((0.111111 * double(input0[i])));


and -quad

output0[i] = FAUSTFLOAT((0.111111 * quad(input0[i])));


so the samples are getting converted, but the representation of 1/9 remains
single precision.  I'd expect to see a lot more digits in double and quad.
  I'm using this version of Faust currently:

bash-3.2$ faust -v
FAUST : DSP to C, C++, JAVA, JavaScript/ASMJavaScript, WebAssembly, LLVM IR
version 2.0.a42
Copyright (C) 2002-2016, GRAME - Centre National de Creation Musicale. All
rights reserved.



Thanks for any feedback or advice...

Aaron Heller (hel...@ai.sri.com)
Menlo Park, CA  US
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to