Bug when exporting impulse with very small DSP scaling factor

The generated Android lib (and I’m assuming maybe other libs as well) for an impulse that has a DSP block using a very small scaling factor ends up having a factor of … 0.0000f.

generates the following DSP config block:

ei_dsp_config_raw_t ei_dsp_config_727 = {
    1,
    10,
    0.00000f  // <---- BUG
};

Hi @kartben2 you’re correct. It’s saved as (<number>v).toFixed(5) + 'f' dropping this indeed. I’ve pushed a fix, if tests pass will be live tomorrow or Thursday.

1 Like

Hi @janjongboom – I think this was fixed for a little while (but not 100% sure), but there seems to be another problem now.
1E-8 gets converted to 1e-8.0f in the model_variables.h file, which doesn’t seem to be valid C? (1e-8f is, though). Thanks!

:man_facepalming: OK, will try again this week to properly fix this.

We’ll now throw an error when we can’t properly write a parameter like this:

DSP Parameter “scale-axes” for DSP block “Spectral features” is too small, and would be truncated to 0. 1e-14 is the smallest number that can be represented.

And fixed for anything between 1e-8 and 1e-14 naturally. Will go out with the patch release this week.