CLAM::SpectralDescriptors Class Reference

#include <SpectralDescriptors.hxx>

Inheritance diagram for CLAM::SpectralDescriptors:

CLAM::DescriptorTmpl< abs > CLAM::ProcessingData CLAM::DynamicType CLAM::Component

List of all members.


Detailed Description

Definition at line 38 of file SpectralDescriptors.hxx.


Public Member Functions

 DYNAMIC_TYPE_USING_INTERFACE (SpectralDescriptors, 21, Descriptor)
 DYN_ATTRIBUTE (0, public, TData, Mean)
 The spectral power mean value.
 DYN_ATTRIBUTE (1, public, TData, GeometricMean)
 The geometric mean for the spectral power values sequence.
 DYN_ATTRIBUTE (2, public, TData, Energy)
 The squared sum of spectral power distribution values.
 DYN_ATTRIBUTE (3, public, TData, Centroid)
 The frequency where the center of mass of the spectral power distribution lies.
 DYN_ATTRIBUTE (4, public, TData, Moment2)
 DYN_ATTRIBUTE (5, public, TData, Moment3)
 DYN_ATTRIBUTE (6, public, TData, Moment4)
 DYN_ATTRIBUTE (7, public, TData, Moment5)
 DYN_ATTRIBUTE (8, public, TData, Moment6)
 DYN_ATTRIBUTE (9, public, TData, Flatness)
 DYN_ATTRIBUTE (10, public, TData, MagnitudeKurtosis)
 DYN_ATTRIBUTE (11, public, Array< TData >, MFCC)
 DYN_ATTRIBUTE (12, public, TData, MaxMagFreq)
 Frequency of the maximum magnitude of the spectrum normalized by the spectral range.
 DYN_ATTRIBUTE (13, public, TData, LowFreqEnergyRelation)
 The ratio between the energy over 0-100 Hz band and the whole spectrum energy.
 DYN_ATTRIBUTE (14, public, TData, Spread)
 The spectral spread is the variation of the spectrum around its mean value.
 DYN_ATTRIBUTE (15, public, TData, MagnitudeSkewness)
 DYN_ATTRIBUTE (16, public, TData, Rolloff)
 The spectral roll-off point is the frequency value so that the 85% of the spectral energy is contained below it.
 DYN_ATTRIBUTE (17, public, TData, Slope)
 The spectral slope represents the amount of decreasing of the spectral magnitude.
 DYN_ATTRIBUTE (18, public, TData, HighFrequencyContent)
 Sum of the squared spectrum magnitude multiplied by the wave number of the bin.
 DYN_ATTRIBUTE (19, public, Array< SpectralDescriptors >, BandDescriptors)
 DYN_ATTRIBUTE (20, public, Array< TData >, PCP)
 SpectralDescriptors (Spectrum *pSpectrum)
 SpectralDescriptors (TData initVal)
const SpectrumGetpSpectrum () const
void SetpSpectrum (Spectrum *pSpectrum)
void ConcreteCompute ()
void DefaultInit ()
 The concrete dynamic type constructor calls DefaultInit().
void CopyInit (const SpectralDescriptors &copied)
TData ComputeSpectralFlatness ()
TData ComputeHighFrequencyContent ()
TData ComputeMaxMagFreq ()
 It computes the frequency where the spectrum has its maximum value.
TData ComputeLowFreqEnergyRelation ()
TData ComputeRolloff ()
TData ComputeSpread ()
TData ComputeSlope ()

Constructor & Destructor Documentation

CLAM::SpectralDescriptors::SpectralDescriptors ( Spectrum pSpectrum  ) 

Definition at line 101 of file SpectralDescriptors.cxx.

References CLAM_ASSERT, and CLAM::EScale::eLinear.

CLAM::SpectralDescriptors::SpectralDescriptors ( TData  initVal  ) 

Definition at line 109 of file SpectralDescriptors.cxx.

References CLAM::DynamicType::UpdateData().


Member Function Documentation

CLAM::SpectralDescriptors::DYNAMIC_TYPE_USING_INTERFACE ( SpectralDescriptors  ,
21  ,
Descriptor   
)

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( ,
public  ,
TData  ,
Mean   
)

The spectral power mean value.

The unit of this measure can be dB or none, depending on the scale set for the measured Spectrum object.

See also:
Spectrum::SetScale

EScale

Stats::GetMean

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( ,
public  ,
TData  ,
GeometricMean   
)

The geometric mean for the spectral power values sequence.

See this for a definition of this pythagorean mean. Note that computing this measurement over long sequences of small real numbers ( as the ones one usually founds in spectral power distributions derived of audio windowed with a normalized window function ) pose a numerical problem. To avoid this, computation of Geometric mean is restricted to Log scale Spectral Power Distributions since this allows to change the product for a summation.

This measure is expressed in dBs.

See also:
Stats::GetGeometricMean

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( ,
public  ,
TData  ,
Energy   
)

The squared sum of spectral power distribution values.

This measure comes in the same units as the distribution values.

See also:
Stats::GetEnergy

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( ,
public  ,
TData  ,
Centroid   
)

The frequency where the center of mass of the spectral power distribution lies.

This measure is expressed in Hz.

See also:
Stats::GetCentroid

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( ,
public  ,
TData  ,
Moment2   
)

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( ,
public  ,
TData  ,
Moment3   
)

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( ,
public  ,
TData  ,
Moment4   
)

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( ,
public  ,
TData  ,
Moment5   
)

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( ,
public  ,
TData  ,
Moment6   
)

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( ,
public  ,
TData  ,
Flatness   
)

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( 10  ,
public  ,
TData  ,
MagnitudeKurtosis   
)

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( 11  ,
public  ,
Array< TData ,
MFCC   
)

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( 12  ,
public  ,
TData  ,
MaxMagFreq   
)

Frequency of the maximum magnitude of the spectrum normalized by the spectral range.

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( 13  ,
public  ,
TData  ,
LowFreqEnergyRelation   
)

The ratio between the energy over 0-100 Hz band and the whole spectrum energy.

To avoid singularities while keeping descriptor continuity, when the whole spectrum energy drops bellow $10^{-4}$, such value is considered as whole spectrum energy.

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( 14  ,
public  ,
TData  ,
Spread   
)

The spectral spread is the variation of the spectrum around its mean value.

It's computed from the second order moment.

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( 15  ,
public  ,
TData  ,
MagnitudeSkewness   
)

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( 16  ,
public  ,
TData  ,
Rolloff   
)

The spectral roll-off point is the frequency value so that the 85% of the spectral energy is contained below it.

For silences this is 0Hz. Measured in Hz.

\[ Rolloff / \sum_{f=0}^{RollOff} {a_f^2} = 0.85 \times \sum_{f=0}^{SpectralRange} {a_f^2} \]

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( 17  ,
public  ,
TData  ,
Slope   
)

The spectral slope represents the amount of decreasing of the spectral magnitude.

Measured in ??.

See also:
Stats::Slope

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( 18  ,
public  ,
TData  ,
HighFrequencyContent   
)

Sum of the squared spectrum magnitude multiplied by the wave number of the bin.

It could be considered the energy derivative, a high pass filter, which gives higher values for high frequency content.

\[ HighFrequencyContent = \sum_{i=0}^{nBins} i magnitude_i^2 \]

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( 19  ,
public  ,
Array< SpectralDescriptors ,
BandDescriptors   
)

CLAM::SpectralDescriptors::DYN_ATTRIBUTE ( 20  ,
public  ,
Array< TData ,
PCP   
)

const Spectrum * CLAM::SpectralDescriptors::GetpSpectrum (  )  const

Definition at line 146 of file SpectralDescriptors.cxx.

void CLAM::SpectralDescriptors::SetpSpectrum ( Spectrum pSpectrum  ) 

void CLAM::SpectralDescriptors::ConcreteCompute (  )  [virtual]

void CLAM::SpectralDescriptors::DefaultInit ( void   ) 

The concrete dynamic type constructor calls DefaultInit().

This allows user to initialize his/her object. But we define DefaultInit() here because we don't want to force writting one DefaultInit() function for each concrete dynamic type. If a dynamic type concrete class defines some (not-default) constructors, this should also call the DefaultInit().

See also:
CopyInit()

Reimplemented from CLAM::DynamicType.

Definition at line 134 of file SpectralDescriptors.cxx.

References CLAM::DescriptorTmpl< abs >::mpStats.

void CLAM::SpectralDescriptors::CopyInit ( const SpectralDescriptors copied  ) 

Definition at line 140 of file SpectralDescriptors.cxx.

References mpSpectrum, and CLAM::DescriptorTmpl< abs >::mpStats.

TData CLAM::SpectralDescriptors::ComputeSpectralFlatness (  ) 

TData CLAM::SpectralDescriptors::ComputeHighFrequencyContent (  ) 

Definition at line 220 of file SpectralDescriptors.cxx.

References CLAM::Spectrum::GetSize().

Referenced by ConcreteCompute().

TData CLAM::SpectralDescriptors::ComputeMaxMagFreq (  ) 

It computes the frequency where the spectrum has its maximum value.

It there are more than one frequency with the same magnitude, it takes the lower one.

Todo:
Promote MaxPosition to Stats

Definition at line 241 of file SpectralDescriptors.cxx.

References CLAM::DynamicType::data, and CLAM::Spectrum::GetSize().

Referenced by ConcreteCompute().

TData CLAM::SpectralDescriptors::ComputeLowFreqEnergyRelation (  ) 

TData CLAM::SpectralDescriptors::ComputeRolloff (  ) 

TData CLAM::SpectralDescriptors::ComputeSpread (  ) 

TData CLAM::SpectralDescriptors::ComputeSlope (  ) 


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

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