|
arduino-audio-tools
|
Driver for the fixedpoint-fft library (https://github.com/pschatzmann/fixedpoint-fft). CalcT selects the calculation type used by the underlying engine: int8_t/int16_t/int32_t for fixed point Qn math (smallest/fastest, ideal for plain AVR), or float/double on FPU-equipped targets (ESP32, Cortex-M4F/M7, desktop). Defaults to int16_t (Q15), which gives good precision at any FFT size without needing an FPU. The FFTDriver interface itself is always float, so values are rescaled into/out of CalcT's Qn range on the way in/out via fixedpoint_fft::fftConvertSample. More...
#include <AudioFixedFFT.h>


Public Member Functions | |
| bool | begin (int len) override |
| void | end () override |
| fixedpoint_fft::FixedFFTEngineCore< CalcT > * | engine () |
| Provides access to the underlying fixedpoint-fft engine. | |
| void | fft () override |
| Perform FFT. | |
| bool | getBin (int pos, FFTBin &bin) override |
| gets the value of a bin | |
| float | getValue (int idx) override |
| get Real value | |
| bool | isReverseFFT () override |
| Returns true if reverse FFT is supported. | |
| bool | isValid () override |
| float | magnitude (int idx) override |
| Calculate the magnitude (fft result) at index (sqr(i² + r²)) | |
| float | magnitudeFast (int idx) override |
| magnitude w/o sqrt | |
| void | rfft () override |
| Inverse fft - convert fft result back to time domain (samples) | |
| bool | setBin (int pos, FFTBin &bin) |
| sets the value of a bin | |
| bool | setBin (int pos, float real, float img) override |
| sets the value of a bin | |
| void | setValue (int idx, float value) override |
| Sets the real value. | |
Protected Member Functions | |
| float | imagAsFloat (int idx) |
| float | realAsFloat (int idx) |
Protected Attributes | |
| fixedpoint_fft::FixedFFTEngineCore< CalcT > | ffp_object |
| int | len = 0 |
| bool | valid = false |
Driver for the fixedpoint-fft library (https://github.com/pschatzmann/fixedpoint-fft). CalcT selects the calculation type used by the underlying engine: int8_t/int16_t/int32_t for fixed point Qn math (smallest/fastest, ideal for plain AVR), or float/double on FPU-equipped targets (ESP32, Cortex-M4F/M7, desktop). Defaults to int16_t (Q15), which gives good precision at any FFT size without needing an FPU. The FFTDriver interface itself is always float, so values are rescaled into/out of CalcT's Qn range on the way in/out via fixedpoint_fft::fftConvertSample.
Implements FFTDriver.
|
inlineoverridevirtual |
Implements FFTDriver.
|
inline |
Provides access to the underlying fixedpoint-fft engine.
|
inlineoverridevirtual |
Perform FFT.
Implements FFTDriver.
gets the value of a bin
Reimplemented from FFTDriver.
get Real value
Implements FFTDriver.
|
inlineoverridevirtual |
Returns true if reverse FFT is supported.
Reimplemented from FFTDriver.
Calculate the magnitude (fft result) at index (sqr(i² + r²))
Implements FFTDriver.
magnitude w/o sqrt
Implements FFTDriver.
|
inlineoverridevirtual |
Inverse fft - convert fft result back to time domain (samples)
Reimplemented from FFTDriver.
|
inlineoverridevirtual |
sets the value of a bin
Reimplemented from FFTDriver.
Sets the real value.
Implements FFTDriver.
|
protected |
|
protected |
|
protected |