libvisual
0.5.0
|
Computes a Discrete Fourier Transform. More...
#include <libvisual/lv_fourier.h>
Public Member Functions | |
DFT (unsigned int samples_out, unsigned int samples_in) | |
Creates a DFT object used to calculate amplitude spectrums over audio data. More... | |
DFT (DFT const &)=delete | |
DFT (DFT &&rhs) | |
Move constructor. | |
~DFT () | |
Destructor. | |
DFT & | operator= (DFT const &)=delete |
DFT & | operator= (DFT &&rhs) |
Move assignment operator. | |
unsigned int | get_spectrum_size () const |
Returns the output size of the DFT. More... | |
void | perform (float *output, float const *input) |
Performs a DFT over a set of input samples. More... | |
Static Public Member Functions | |
static void | log_scale (float *output, float const *input, unsigned int size) |
Logarithmically scales an amplitude spectrum. More... | |
static void | log_scale_standard (float *output, float const *input, unsigned int size) |
static void | log_scale_custom (float *output, float const *input, unsigned int size, float log_scale_divisor) |
Computes a Discrete Fourier Transform.
Definition at line 41 of file lv_fourier.h.
LV::DFT::DFT | ( | unsigned int | samples_out, |
unsigned int | samples_in | ||
) |
Creates a DFT object used to calculate amplitude spectrums over audio data.
samples_in | The number of samples provided to every call to DFT::perform() as input. |
samples_out | Size of output spectrum (number of output samples). |
Definition at line 203 of file lv_fourier.cpp.
unsigned int LV::DFT::get_spectrum_size | ( | ) | const |
Returns the output size of the DFT.
|
static |
Logarithmically scales an amplitude spectrum.
output | Array of output samples |
input | Array of input samples with values in [0.0, 1.0] |
size | Array size. |
Definition at line 245 of file lv_fourier.cpp.
void LV::DFT::perform | ( | float * | output, |
float const * | input | ||
) |
Performs a DFT over a set of input samples.
output | Array of output samples |
input | Array of input samples with values in [-1.0, 1.0] |
Definition at line 226 of file lv_fourier.cpp.
Referenced by LV::Audio::get_spectrum_for_sample().