CLAM::SpectralAnalysisConfig Class Reference

#include <SpectralAnalysisConfig.hxx>

Inheritance diagram for CLAM::SpectralAnalysisConfig:

CLAM::ProcessingConfig CLAM::DynamicType CLAM::Component

List of all members.


Detailed Description

Configuration class for Spectral Analysis class It includes specific parameters: HopSize, ZeroPadding, Sampling Rate and FFTSize.

Further setter/getters are also offered for WindowSize and WindowType. It also includes complete configurations for child processings: WindowGenerator, Circular Shift and FFT. These configurations should only be modified by advanced users

Definition at line 42 of file SpectralAnalysisConfig.hxx.


Public Member Functions

void SetWindowSize (TSize w)
 Sets Analysis Window size in num.
TSize GetWindowSize () const
 Getter for window size.
void SetWindowType (const EWindowType &t)
 Sets Analysis Window type, modifying configuration of child Window Generator configuration.
const EWindowTypeGetWindowType () const
 Getter for window type, returns window type in Window Generator.
void SetZeroPadding (int z)
 Sets Zero padding factor.
int GetZeroPadding () const
 returns ZeroPaddingFactor being used.
void SetHopSize (TSize h)
 Sets Analysis Hop size in number of samples.
TSize GetHopSize () const
 returns HopSize in number of samples.
void SetSamplingRate (TData sr)
 Sets Sampling rate of the input audio.
TData GetSamplingRate () const
 returns SamplingRate
void Sync ()
 synchronize configuration values just in case they had been modified directly

Friends

class SpectralAnalysis

Member Function Documentation

void CLAM::SpectralAnalysisConfig::SetWindowSize ( TSize  w  ) 

Sets Analysis Window size in num.

of samples. This setter actually changes window size in the window generator, size of the FFT, and amount of circular shift. If new window size is smaller than twice the hop size plus one, hop size is also modified to that value. Note1: for best results, window size should be set to odd number. Note2: this setter should be called after the hop size has already been set.

Definition at line 59 of file SpectralAnalysisConfig.cxx.

References CLAM_ASSERT, CLAM_pow(), GetHopSize(), GetZeroPadding(), nextPowerOfTwo(), and SetHopSize().

Referenced by SetSamplingRate(), and Sync().

TSize CLAM::SpectralAnalysisConfig::GetWindowSize (  )  const

Getter for window size.

Actually returns size of the window generator.

Definition at line 72 of file SpectralAnalysisConfig.cxx.

Referenced by CLAM::SpectralAnalysis::Do(), SetSamplingRate(), and SetZeroPadding().

void CLAM::SpectralAnalysisConfig::SetWindowType ( const EWindowType t  ) 

Sets Analysis Window type, modifying configuration of child Window Generator configuration.

Analysis Window type.

See also:
EWindowType

Definition at line 78 of file SpectralAnalysisConfig.cxx.

Referenced by Sync().

const EWindowType & CLAM::SpectralAnalysisConfig::GetWindowType (  )  const

Getter for window type, returns window type in Window Generator.

Definition at line 84 of file SpectralAnalysisConfig.cxx.

void CLAM::SpectralAnalysisConfig::SetZeroPadding ( int  z  ) 

Sets Zero padding factor.

Zero padding factor.

It changes FFTSize and Circular shift accordingly. If factor is 0, FFTSize is set to WindowSize-1 next power of two (assumes window size is odd!) Assuming a WindowSize of 513, see following table to understand how the factor works: ZeroPaddingFactor FFTSize -1 256 0 512 1 1024 2 2048

See also:
PowerOfTwo

Definition at line 90 of file SpectralAnalysisConfig.cxx.

References CLAM_pow(), GetWindowSize(), GetZeroPadding(), and nextPowerOfTwo().

Referenced by Sync().

int CLAM::SpectralAnalysisConfig::GetZeroPadding (  )  const

returns ZeroPaddingFactor being used.

Definition at line 97 of file SpectralAnalysisConfig.cxx.

Referenced by SetWindowSize(), and SetZeroPadding().

void CLAM::SpectralAnalysisConfig::SetHopSize ( TSize  h  ) 

Sets Analysis Hop size in number of samples.

This setter only changes attribute but does not change configurations accordingly! VIP: It assumes that a SetWindowSize is called afterwards.

Definition at line 104 of file SpectralAnalysisConfig.cxx.

Referenced by SetWindowSize(), and Sync().

TSize CLAM::SpectralAnalysisConfig::GetHopSize (  )  const

returns HopSize in number of samples.

Definition at line 109 of file SpectralAnalysisConfig.cxx.

Referenced by SetWindowSize().

void CLAM::SpectralAnalysisConfig::SetSamplingRate ( TData  sr  ) 

Sets Sampling rate of the input audio.

Sampling rate of the input audio.

It calls SetWindowSize for synchronizing existing configurations.

for sychronizing existing config

Definition at line 115 of file SpectralAnalysisConfig.cxx.

References GetWindowSize(), and SetWindowSize().

Referenced by Sync().

TData CLAM::SpectralAnalysisConfig::GetSamplingRate (  )  const

returns SamplingRate

Definition at line 122 of file SpectralAnalysisConfig.cxx.

void CLAM::SpectralAnalysisConfig::Sync (  ) 

synchronize configuration values just in case they had been modified directly

Definition at line 128 of file SpectralAnalysisConfig.cxx.

References SetHopSize(), SetSamplingRate(), SetWindowSize(), SetWindowType(), and SetZeroPadding().


Friends And Related Function Documentation

friend class SpectralAnalysis [friend]

Definition at line 44 of file SpectralAnalysisConfig.hxx.


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

Generated on Tue Aug 12 22:33:48 2008 for CLAM by  doxygen 1.5.5