dplug.dsp.fft

High-level interfaces for providing FFT analysis, real FFT, and resynthesis from grains.

Members

Functions

convertFFTBinToFrequency
float convertFFTBinToFrequency(float fftBin, int fftSize, float samplingRate)

Converts a FFT bin to a frequency. Returns: Corresponding center frequency.

convertFFTBinToFrequencyInv
float convertFFTBinToFrequencyInv(float fftBin, float invFFTSize, float samplingRate)

Converts a FFT bin to a frequency. Returns: Corresponding center frequency.

convertFFTBinToNormalizedFrequency
float convertFFTBinToNormalizedFrequency(float fftBin, int fftSize)

Converts a FFT bin to a normalized frequency. Params: fftBin = Bin index in the FFT. fftSize = Size of FFT.

convertFFTBinToNormalizedFrequencyInv
float convertFFTBinToNormalizedFrequencyInv(float fftBin, float invFFTSize)

Converts a FFT bin to a normalized frequency. Params: fftBin = Bin index of the FFT. invFFTSize = Inverse size of FFT.

convertFrequencyToFFTBin
float convertFrequencyToFFTBin(float frequencyHz, float samplingRate, int fftSize)

Converts a frequency to a FFT bin. Returns: Corresponding fractional bin.

convertFrequencyToFFTBinInv
float convertFrequencyToFFTBinInv(float frequencyHz, float invSamplingRate, int fftSize)

Converts a frequency to a FFT bin. Returns: Corresponding fractional bin.

convertNormalizedFrequencyToFFTBin
float convertNormalizedFrequencyToFFTBin(float normalizedFrequency, int fftSize)

Converts a normalized frequency to a FFT bin. Params: normalizedFrequency = Frequency in cycles per sample. fftSize = Size of FFT.

forwardFFT
void forwardFFT(BuiltinComplex!T[] buffer)

Perform in-place FFT. Equivalent to std.numeric.fft, but this one is nothrow @nogc.

inverseFFT
void inverseFFT(BuiltinComplex!T[] buffer)

Perform in-place inverse FFT. Equivalent to std.numeric.inverseFft, but this one is nothrow @nogc.

Structs

FFTAnalyzer
struct FFTAnalyzer(T)

From a signal, output short term FFT data. Variable overlap. Introduces approximately windowSize/2 samples delay. Uses a real FFT to gain some speed.

RFFT
struct RFFT(T)

Perform a FFT from a real signal, saves up CPU.

Segmenter
struct Segmenter(T)

From a signal, output chunks of determined size, with optional overlap. Introduces approximately windowSize/2 samples delay.

ShortTermReconstruction
struct ShortTermReconstruction

From short term windowed data, output the summed signal. Segments can be irregular and have different size.

Meta

Authors

Guillaume Piolat