Closed giuliomoro closed 3 years ago
It took a second once I was able to printf.
bea2da563b633884f12a80836127853540fd7c7f including matlab example
With a typical musical signal, what happens is:
<< log2(fftSize)
your result to go back to 1.15(16 - log2(data.getMaxValue())
, but this will most likely cause clipping when you apply the ifft.Conclusion: q15 fft is probably good only if you do not need to do fft/ifft. For instance, if you are only analyzing something in the frequency domain (e.g.: find the spectral centroid), it could be good enough.
done in ShortFastFourierTransform
According to the docs, no rescaling is performed when operating the integer-valued fft https://www.keil.com/pack/doc/CMSIS/DSP/html/group___real_f_f_t.html#ga053450cc600a55410ba5b5605e96245d
gives the value of the fft divided by the number of elements.
According to the table in the docs this has to be interpreted as a fixed-point integer of format log2(size).(16-log2(size)), while the input is interpreted as 1.15.
Experimental measurements show that these values are correct.