CLAM::WindowGenerator Class Reference

This class can be used for generating Windows and for zeropadding the windowed data. More...

#include <WindowGenerator.hxx>

List of all members.

Public Types

typedef WindowGeneratorConfig Config

Public Member Functions

 WindowGenerator (const WindowGeneratorConfig &c=Config())
 ~WindowGenerator ()
const ProcessingConfigGetConfig () const
 Configuration getter.
bool Do (void)
 Supervised mode execution method (using ports).
bool Do (DataArray &output)
bool Do (Spectrum &output)
bool Do (Audio &output)
bool MayDisableExecution () const
void SetSize (TSize size)

Protected Attributes

AudioOutPort mOutput

Detailed Description

This class can be used for generating Windows and for zeropadding the windowed data.

The Do functions accept different types of data, which are simple Arrays, Audio and Spectrum.

If the window is smaller as the Data Array then the rest of the Array is filled with Zeroes.

The Size of the window can be changed via a control, the Type (Hamming,Kaiser, etc) is fixed. A configuration option is to generate the window everytime the Do() function is called. This is settable via the UseTable element of the configuration.

Note: The last and the first element of the window always have the same value, therefore, if you want to use it for windowing an FFT, you have to create a window of size FFTSize+1. (if you care for correctness) This class can be used for generating Windows and for zeropadding the windowed data. The Do functions accept different types of data, which are simple Arrays, Audio and Spectrum.

If the window is smaller as the Data Array then the rest of the Array is filled with Zeroes.

The Size of the window can be changed via a control, the Type (Hamming,Kaiser, etc) is fixed. A configuration option is to generate the window everytime the Do() function is called. This is settable via the UseTable element of the configuration.

Note: The last and the first element of the window always have the same value, therefore, if you want to use it for windowing an FFT, you have to create a window of size FFTSize+1. (if you care for correctness)

Definition at line 80 of file WindowGenerator.hxx.


Member Typedef Documentation

Reimplemented from CLAM::Processing.

Definition at line 82 of file WindowGenerator.hxx.


Constructor & Destructor Documentation

CLAM::WindowGenerator::WindowGenerator ( const WindowGeneratorConfig c = Config()  ) 

Definition at line 45 of file WindowGenerator.cxx.

References CLAM::Processing::Configure().

CLAM::WindowGenerator::~WindowGenerator (  ) 

Definition at line 52 of file WindowGenerator.cxx.


Member Function Documentation

bool CLAM::WindowGenerator::Do ( Audio output  ) 

Definition at line 125 of file WindowGenerator.cxx.

References Do().

bool CLAM::WindowGenerator::Do ( Spectrum output  ) 

Definition at line 133 of file WindowGenerator.cxx.

References CLAM_ASSERT, and Do().

bool CLAM::WindowGenerator::Do ( DataArray output  ) 
bool CLAM::WindowGenerator::Do ( void   )  [virtual]

Supervised mode execution method (using ports).

Returns:
A boolean telling whether it has been output

Implements CLAM::Processing.

Definition at line 85 of file WindowGenerator.cxx.

References CLAM::Processing::AbleToExecute(), CLAM_ASSERT, CLAM::AudioOutPort::GetAudio(), mOutput, and CLAM::OutPort< Token >::Produce().

Referenced by Do().

const ProcessingConfig& CLAM::WindowGenerator::GetConfig (  )  const [inline, virtual]

Configuration getter.

Gets the configuration parameters used to create the object.

Returns:
Const reference to the configuration object. The usual way to perform a configuration change in the processing object is to take a copy of this reference, to change it and to send it with the Configure method. If not overriden, it returns a NullProcessingConfig.

Reimplemented from CLAM::Processing.

Definition at line 98 of file WindowGenerator.hxx.

bool CLAM::WindowGenerator::MayDisableExecution (  )  const [inline]

Definition at line 106 of file WindowGenerator.hxx.

void CLAM::WindowGenerator::SetSize ( TSize  size  )  [inline]

Member Data Documentation

Definition at line 115 of file WindowGenerator.hxx.

Referenced by Do().


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.3