DSP  1.5.0
Digital Signal Processing
 All Classes Namespaces Functions
Static Public Member Functions | Public Attributes
DSP.FourierTransform Class Reference

List of all members.

Static Public Member Functions

static void SetMeterFrequencies (int[] meterFrequencies)
 Changes the Frequency Bands to analyze. Affects the other static methods.
static double[] Spectrum (ref double[] x, int method=Raw)
static UInt32 NumberOfBitsNeeded (UInt32 PowerOfTwo)
 Get Number of bits needed for a power of two.
static UInt32 ReverseBits (UInt32 index, UInt32 NumBits)
 Reverse bits.
static Double IndexToFrequency (UInt32 Index, UInt32 NumSamples)
 Return index to frequency based on number of samples.
static void Compute (UInt32 NumSamples, Double[] pRealIn, Double[] pImagIn, Double[] pRealOut, Double[] pImagOut, Boolean bInverseTransform)
 Compute FFT.
static void Norm (UInt32 NumSamples, Double[] pReal, Double[] pImag, Double[] pAmpl)
 Calculate normal (power spectrum)
static double normalizeFFTValue (double value)
static void Compute2D (UInt32 width, UInt32 height, ref Double[] pRealIn, Double[] pImagIn, ref Double[] pRealOut, ref Double[] pImagOut, Boolean bInverseTransform=false)
static Double PeakFrequency (UInt32 NumSamples, Double[] pAmpl, Double samplingRate, ref UInt32 index)
 Find Peak frequency in Hz.
static byte[] GetPeaks (double[] leftChannel, double[] rightChannel, int sampleFrequency)

Public Attributes

const int Raw = 1
const int Decibel = 2
const int FREQUENCYSLOTCOUNT = 21

Member Function Documentation

static void DSP.FourierTransform.Compute ( UInt32  NumSamples,
Double[]  pRealIn,
Double[]  pImagIn,
Double[]  pRealOut,
Double[]  pImagOut,
Boolean  bInverseTransform 
) [static]

Compute FFT.

Parameters:
NumSamplesNumSamples Number of samples (must be power two)
pRealInReal samples
pImagInImaginary (optional, may be null)
pRealOutReal coefficient output
pImagOutImaginary coefficient output
bInverseTransformbInverseTransform when true, compute Inverse FFT
static void DSP.FourierTransform.Compute2D ( UInt32  width,
UInt32  height,
ref Double[]  pRealIn,
Double[]  pImagIn,
ref Double[]  pRealOut,
ref Double[]  pImagOut,
Boolean  bInverseTransform = false 
) [static]

Compute 2D FFT

Parameters:
widthWidth of the Matrix (must be power two)
heightHeight of the Matrix (must be power two)
pRealInReal samples
pImagInImaginary (optional, may be null)
pRealOutReal coefficient output
pImagOutImaginary coefficient output
bInverseTransformbInverseTransform when true, compute Inverse FFT
static Double DSP.FourierTransform.IndexToFrequency ( UInt32  Index,
UInt32  NumSamples 
) [static]

Return index to frequency based on number of samples.

Parameters:
Indexsample index
NumSamplesnumber of samples
Returns:
Frequency index range
static void DSP.FourierTransform.Norm ( UInt32  NumSamples,
Double[]  pReal,
Double[]  pImag,
Double[]  pAmpl 
) [static]

Calculate normal (power spectrum)

Parameters:
NumSamplesNumber of sample
pRealReal coefficient buffer
pImagImaginary coefficient buffer
pAmplWorking buffer to hold amplitude Xps(m) = | X(m)^2 | = Xreal(m)^2 + Ximag(m)^2
static UInt32 DSP.FourierTransform.NumberOfBitsNeeded ( UInt32  PowerOfTwo) [static]

Get Number of bits needed for a power of two.

Parameters:
PowerOfTwoPower of two number
Returns:
Number of bits
static Double DSP.FourierTransform.PeakFrequency ( UInt32  NumSamples,
Double[]  pAmpl,
Double  samplingRate,
ref UInt32  index 
) [static]

Find Peak frequency in Hz.

Parameters:
NumSamplesNumber of samples
pAmplCurrent amplitude
samplingRateSampling rate in samples/second (Hz)
indexFrequency index
Returns:
Peak frequency in Hz
static UInt32 DSP.FourierTransform.ReverseBits ( UInt32  index,
UInt32  NumBits 
) [static]

Reverse bits.

Parameters:
indexBits
NumBitsNumber of bits to reverse
Returns:
Reverse Bits
static void DSP.FourierTransform.SetMeterFrequencies ( int[]  meterFrequencies) [static]

Changes the Frequency Bands to analyze. Affects the other static methods.

Parameters:
meterFrequencies

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions