Sliding discrete Fourier transform (SDFT) More...
#include <DFT.h>
Public Member Functions | |
SDFT (uint32_t sizeDFT, uint32_t binLo, uint32_t binHi) | |
void | forward (T input) |
Input next sample and perform forward transform. | |
SDFT & | interval (uint32_t binLo, uint32_t binHi) |
Set endpoints of frequency interval. | |
void | resize (uint32_t sizeDFT, uint32_t binLo, uint32_t binHi) |
Resize transform. | |
T * | aux (uint32_t num) |
Get pointer to an auxiliary buffer. | |
Complex< T > * | bins () const |
Get pointer to bin data. | |
Complex< T > & | bin (uint32_t k) |
Get reference to bin value. | |
const Complex< T > & | bin (uint32_t k) const |
Get read-only reference to bin value. | |
double | binFreq () const |
Get width of frequency bins. | |
uint32_t | numBins () const |
Get number of frequency bins. | |
uint32_t | sizeDFT () const |
Get size of forward transform. | |
Sync & | syncFreq () |
Get frequency domain synchronizer. | |
void | numAux (uint32_t num) |
Sets number of auxilliary buffers, each of size numBins() | |
virtual void | onResync (double r) |
Called by my Sync reference after it changes its value. | |
double | scaleSPU () const |
Returns ratio of my SPU to my Sync's SPU. | |
void | scaleSPU (double v) |
Scales samples/unit by factor. | |
double | spu () const |
Returns local samples/unit. | |
void | spu (double v) |
Set local samples/unit. | |
double | ups () const |
Returns local units/sample. | |
void | ups (double v) |
Set local units/sample. | |
const Sync * | sync () const |
Returns reference to my Sync. | |
void | sync (Sync &src) |
Set absolute Sync source. | |
void | scaleUPS (double v) |
Scales units/sample by factor. | |
void | nodeInsertL (Synced &node) |
Insert myself to left of node. | |
void | nodeInsertR (Synced &node) |
Insert myself to right of node. | |
void | nodeRemove () |
Remove myself from linked list. | |
Public Attributes | |
Synced * | nodeL |
Pointer to left node. | |
Synced * | nodeR |
Pointer to right node. | |
Protected Member Functions | |
void | initSynced () |
To be called from the constructor(s) of derived classes. |
Sliding discrete Fourier transform (SDFT)
This transform computes the DFT with a fixed hop size of 1 sample and within a specified frequency interval. The computational complexity per sample is O(M), where M is the size, in samples, of the frequency interval.
SDFT | ( | uint32_t | sizeDFT, |
uint32_t | binLo, | ||
uint32_t | binHi | ||
) |
[in] | sizeDFT | transform size, in samples |
[in] | binLo | lower closed endpoint of frequency interval |
[in] | binHi | upper open endpoint of frequency interval |
void onResync | ( | double | ratioSPU | ) | [virtual, inherited] |