faust
faust copied to clipboard
feature request — allow to configure meaning of "int" at compile-time
in difference to the faust datatype float
, the faust datatype int
is currently fixed to be represented as int
(in cpp-language output).
Since faust is perfectly capable to be used for integer DSP routines, it would be good to be able to specify, which integer representation (i.e. granularity) will be used in the generated code (similar to the -quad
/ -single
and -double
flags).
For the sake of clarity, I would vote to implement C++ standard types (int32_t
, etc.). This would also imply to be able to switch between different constants (INT_MIN
/ INT_MAX
, as proposed in #455).
What kind for size would you need ?
for my purpose, I'd like to (a) know the bitlength of integers at compile-time and (b) be able to change to different length as it is currently possible with floats. I am trying to implement bit-based dsp in faust, for which I rely on integers to store delta-sigma dsp information. the size of the integer determines the number of bits being stored in one int...