gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
RealFFTData Class Reference

class RealFFTData controls and manipulates fft data More...

#include <RealFFTData.H>

Public Member Functions

 RealFFTData (int sz)
 All memory to be allocated internally. More...
 
 RealFFTData (int sz, fftw_real *inp, fftw_real *outp)
 input and output data arrays are to be allocated by another process More...
 
 ~RealFFTData (void)
 Deconstructor. More...
 
int limitHalfPowerSpec (double lim)
 Limits the maximum to 'lim' and returns the last fft bin with max. More...
 
int getSize (void)
 Returns the number of elements in the input and output arrays. More...
 
int getHalfSize (void)
 Returns the number of elements in the power spectrum array. More...
 
fftw_real findMaxIn (void)
 Returns the maximum input variable. More...
 
void findMaxMinPowerBins (void)
 Fills the max and min power spectrum bins. More...
 
int compPowerSpec ()
 This function computes the power spectrum and returns the max bin. More...
 
int sqrtPowerSpec ()
 This function computes the square root of the power spectrum and returns the max bin. More...
 
void powerInDB ()
 This is the power spectrum in dB. More...
 
void zeroFFTData (void)
 This function zeros the output data array (out) More...
 
void load (const unsigned int i, const fftw_real val)
 
fftw_real unload (const unsigned int i)
 
fftw_real unloadPS (const unsigned int i)
 
void dumpIn ()
 For debugging purposes, dump the in array to stdout. More...
 
void dumpOut ()
 For debugging purposes, dump the out array to stdout. More...
 

Public Attributes

int size
 Specifies the size of the data array. More...
 
int minPowerBin
 Specifies the minimum and maximum power bins as used in the methods findMaxMinPowerBins and compPowerSpec. More...
 
int maxPowerBin
 
fftw_realin
 the input, output and power_spectrum arrays More...
 
fftw_realout
 
fftw_realpower_spectrum
 
double totalPower
 The total power (summed) of the power spectrum as used in the method compPowerSpec. More...
 

Private Attributes

int deleteInOutMemory
 Var used to specify if the memory was allocated by the RealFFTData class. More...
 

Detailed Description

class RealFFTData controls and manipulates fft data

Examples:
AudioMaskerExample.C, and RealFFTExample.C.

Definition at line 24 of file RealFFTData.H.

Constructor & Destructor Documentation

◆ RealFFTData() [1/2]

RealFFTData::RealFFTData ( int  sz)

All memory to be allocated internally.

Definition at line 24 of file RealFFTData.C.

◆ RealFFTData() [2/2]

RealFFTData::RealFFTData ( int  sz,
fftw_real inp,
fftw_real outp 
)

input and output data arrays are to be allocated by another process

Definition at line 45 of file RealFFTData.C.

Here is the call graph for this function:

◆ ~RealFFTData()

RealFFTData::~RealFFTData ( void  )

Deconstructor.

Definition at line 68 of file RealFFTData.C.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ compPowerSpec()

int RealFFTData::compPowerSpec ( )

This function computes the power spectrum and returns the max bin.

Examples:
AudioMaskerExample.C, and RealFFTExample.C.

Definition at line 117 of file RealFFTData.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dumpIn()

void RealFFTData::dumpIn ( )

For debugging purposes, dump the in array to stdout.

Examples:
RealFFTExample.C.

Definition at line 215 of file RealFFTData.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dumpOut()

void RealFFTData::dumpOut ( )

For debugging purposes, dump the out array to stdout.

Examples:
RealFFTExample.C.

Definition at line 221 of file RealFFTData.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findMaxIn()

fftw_real RealFFTData::findMaxIn ( void  )

Returns the maximum input variable.

Definition at line 80 of file RealFFTData.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findMaxMinPowerBins()

void RealFFTData::findMaxMinPowerBins ( void  )

Fills the max and min power spectrum bins.

Definition at line 90 of file RealFFTData.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHalfSize()

int RealFFTData::getHalfSize ( void  )
inline

Returns the number of elements in the power spectrum array.

Definition at line 50 of file RealFFTData.H.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSize()

int RealFFTData::getSize ( void  )
inline

Returns the number of elements in the input and output arrays.

Definition at line 48 of file RealFFTData.H.

Here is the caller graph for this function:

◆ limitHalfPowerSpec()

int RealFFTData::limitHalfPowerSpec ( double  lim)

Limits the maximum to 'lim' and returns the last fft bin with max.

Definition at line 104 of file RealFFTData.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load()

void RealFFTData::load ( const unsigned int  i,
const fftw_real  val 
)

load the input data.

Parameters
iThe index to load into.
valThe value to load into in[i]

Definition at line 198 of file RealFFTData.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ powerInDB()

void RealFFTData::powerInDB ( )

This is the power spectrum in dB.

Definition at line 155 of file RealFFTData.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sqrtPowerSpec()

int RealFFTData::sqrtPowerSpec ( )

This function computes the square root of the power spectrum and returns the max bin.

Examples:
RealFFTExample.C.

Definition at line 143 of file RealFFTData.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unload()

fftw_real RealFFTData::unload ( const unsigned int  i)

unload the output data.

Parameters
iThe index to load into.
Returns
The value to load into out[i]

Definition at line 203 of file RealFFTData.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unloadPS()

fftw_real RealFFTData::unloadPS ( const unsigned int  i)

unload the power_spectrum data.

Parameters
iThe index to load into.
Returns
The value to load into power_spectrum[i]

Definition at line 209 of file RealFFTData.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zeroFFTData()

void RealFFTData::zeroFFTData ( void  )

This function zeros the output data array (out)

Definition at line 192 of file RealFFTData.C.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ deleteInOutMemory

int RealFFTData::deleteInOutMemory
private

Var used to specify if the memory was allocated by the RealFFTData class.

Definition at line 26 of file RealFFTData.H.

◆ in

fftw_real* RealFFTData::in

the input, output and power_spectrum arrays

Examples:
AudioMaskerExample.C, and RealFFTExample.C.

Definition at line 33 of file RealFFTData.H.

◆ maxPowerBin

int RealFFTData::maxPowerBin

Definition at line 31 of file RealFFTData.H.

◆ minPowerBin

int RealFFTData::minPowerBin

Specifies the minimum and maximum power bins as used in the methods findMaxMinPowerBins and compPowerSpec.

Definition at line 31 of file RealFFTData.H.

◆ out

fftw_real * RealFFTData::out
Examples:
RealFFTExample.C.

Definition at line 33 of file RealFFTData.H.

◆ power_spectrum

fftw_real * RealFFTData::power_spectrum
Examples:
AudioMaskerExample.C, and RealFFTExample.C.

Definition at line 33 of file RealFFTData.H.

◆ size

int RealFFTData::size

Specifies the size of the data array.

Definition at line 29 of file RealFFTData.H.

◆ totalPower

double RealFFTData::totalPower

The total power (summed) of the power spectrum as used in the method compPowerSpec.

Definition at line 35 of file RealFFTData.H.


The documentation for this class was generated from the following files:
gtkIOStream: RealFFTData Class Reference
GTK+ IOStream  Beta