Xeno-rat
Loading...
Searching...
No Matches
NAudio.Dsp.FastFourierTransform Class Reference

Summary description for FastFourierTransform. More...

Collaboration diagram for NAudio.Dsp.FastFourierTransform:

Static Public Member Functions

static void FFT (bool forward, int m, Complex[] data)
 Computes the Fast Fourier Transform (FFT) of the input data array.
 
static double HammingWindow (int n, int frameSize)
 Calculates the value of the Hamming window function at the specified index for a given frame size.
 
static double HannWindow (int n, int frameSize)
 Calculates the Hann window value for the given index and frame size.
 
static double BlackmannHarrisWindow (int n, int frameSize)
 Calculates the value of the Blackman-Harris window function at a given index.
 

Detailed Description

Summary description for FastFourierTransform.

Member Function Documentation

◆ BlackmannHarrisWindow()

static double NAudio.Dsp.FastFourierTransform.BlackmannHarrisWindow ( int n,
int frameSize )
inlinestatic

Calculates the value of the Blackman-Harris window function at a given index.

Parameters
nThe index at which to calculate the window function value.
frameSizeThe size of the frame for which the window function is being calculated.
Returns
The value of the Blackman-Harris window function at the specified index n .

◆ FFT()

static void NAudio.Dsp.FastFourierTransform.FFT ( bool forward,
int m,
Complex[] data )
inlinestatic

Computes the Fast Fourier Transform (FFT) of the input data array.

Parameters
forwardSpecifies whether to compute the forward or inverse FFT.
mThe number of bits representing the size of the input data array.
dataThe input data array of complex numbers.

This method computes the FFT of the input data array using the Cooley-Tukey algorithm, which is a divide-and-conquer algorithm for efficiently computing the FFT. The method performs bit reversal on the input data array, then computes the FFT using iterative butterfly operations. The scaling for the forward transform is applied if the forward parameter is set to true.

◆ HammingWindow()

static double NAudio.Dsp.FastFourierTransform.HammingWindow ( int n,
int frameSize )
inlinestatic

Calculates the value of the Hamming window function at the specified index for a given frame size.

Parameters
nThe index at which to calculate the Hamming window function.
frameSizeThe size of the frame for which the Hamming window function is being calculated.
Returns
The value of the Hamming window function at the specified index for the given frame size.

The Hamming window function is defined as 0.54 - 0.46 * Math.Cos((2 * Math.PI * n) / (frameSize - 1)). It is commonly used in signal processing to reduce spectral leakage when performing a Fourier Transform on a windowed signal.

◆ HannWindow()

static double NAudio.Dsp.FastFourierTransform.HannWindow ( int n,
int frameSize )
inlinestatic

Calculates the Hann window value for the given index and frame size.

Parameters
nThe index for which the Hann window value is to be calculated.
frameSizeThe size of the frame for which the Hann window value is to be calculated.
Returns
The Hann window value for the given index and frame size.

The documentation for this class was generated from the following file: