qm-dsp  1.8
DetectionFunction Class Reference

#include <DetectionFunction.h>

List of all members.

Public Member Functions

double * getSpectrumMagnitude ()
 DetectionFunction (DFConfig Config)
virtual ~DetectionFunction ()
double processTimeDomain (const double *samples)
 Process a single time-domain frame of audio, provided as frameLength samples.
double processFrequencyDomain (const double *reals, const double *imags)
 Process a single frequency-domain frame, provided as frameLength/2+1 real and imaginary component values.

Private Member Functions

void whiten ()
double runDF ()
double HFC (unsigned int length, double *src)
double specDiff (unsigned int length, double *src)
double phaseDev (unsigned int length, double *srcPhase)
double complexSD (unsigned int length, double *srcMagnitude, double *srcPhase)
double broadband (unsigned int length, double *srcMagnitude)
void initialise (DFConfig Config)
void deInitialise ()

Private Attributes

int m_DFType
unsigned int m_dataLength
unsigned int m_halfLength
unsigned int m_stepSize
double m_dbRise
bool m_whiten
double m_whitenRelaxCoeff
double m_whitenFloor
double * m_magHistory
double * m_phaseHistory
double * m_phaseHistoryOld
double * m_magPeaks
double * m_windowed
double * m_magnitude
double * m_thetaAngle
double * m_unwrapped
Window< double > * m_window
PhaseVocoderm_phaseVoc

Detailed Description

Definition at line 40 of file DetectionFunction.h.


Constructor & Destructor Documentation

Definition at line 34 of file DetectionFunction.cpp.

References deInitialise().


Member Function Documentation

Definition at line 278 of file DetectionFunction.cpp.

References m_magnitude.

double DetectionFunction::processTimeDomain ( const double *  samples)

Process a single time-domain frame of audio, provided as frameLength samples.

Definition at line 93 of file DetectionFunction.cpp.

References Window< T >::cut(), m_magnitude, m_phaseVoc, m_thetaAngle, m_unwrapped, m_whiten, m_window, m_windowed, PhaseVocoder::processTimeDomain(), runDF(), and whiten().

double DetectionFunction::processFrequencyDomain ( const double *  reals,
const double *  imags 
)

Process a single frequency-domain frame, provided as frameLength/2+1 real and imaginary component values.

Definition at line 105 of file DetectionFunction.cpp.

References m_magnitude, m_phaseVoc, m_thetaAngle, m_unwrapped, m_whiten, PhaseVocoder::processFrequencyDomain(), runDF(), and whiten().

double DetectionFunction::HFC ( unsigned int  length,
double *  src 
) [private]

Definition at line 163 of file DetectionFunction.cpp.

Referenced by runDF().

double DetectionFunction::specDiff ( unsigned int  length,
double *  src 
) [private]

Definition at line 175 of file DetectionFunction.cpp.

References m_magHistory.

Referenced by runDF().

double DetectionFunction::phaseDev ( unsigned int  length,
double *  srcPhase 
) [private]

Definition at line 199 of file DetectionFunction.cpp.

References m_phaseHistory, m_phaseHistoryOld, and MathUtilities::princarg().

Referenced by runDF().

double DetectionFunction::complexSD ( unsigned int  length,
double *  srcMagnitude,
double *  srcPhase 
) [private]

Definition at line 232 of file DetectionFunction.cpp.

References m_magHistory, m_phaseHistory, m_phaseHistoryOld, and MathUtilities::princarg().

Referenced by runDF().

double DetectionFunction::broadband ( unsigned int  length,
double *  srcMagnitude 
) [private]

Definition at line 264 of file DetectionFunction.cpp.

References m_dbRise, and m_magHistory.

Referenced by runDF().


Member Data Documentation

Definition at line 73 of file DetectionFunction.h.

Referenced by initialise(), and runDF().

unsigned int DetectionFunction::m_dataLength [private]

Definition at line 74 of file DetectionFunction.h.

Referenced by initialise().

unsigned int DetectionFunction::m_halfLength [private]

Definition at line 75 of file DetectionFunction.h.

Referenced by initialise(), runDF(), and whiten().

unsigned int DetectionFunction::m_stepSize [private]

Definition at line 76 of file DetectionFunction.h.

Referenced by initialise().

double DetectionFunction::m_dbRise [private]

Definition at line 77 of file DetectionFunction.h.

Referenced by broadband().

Definition at line 78 of file DetectionFunction.h.

Referenced by initialise(), processFrequencyDomain(), and processTimeDomain().

Definition at line 79 of file DetectionFunction.h.

Referenced by initialise(), and whiten().

Definition at line 80 of file DetectionFunction.h.

Referenced by initialise(), and whiten().

double* DetectionFunction::m_magPeaks [private]

Definition at line 85 of file DetectionFunction.h.

Referenced by deInitialise(), DetectionFunction(), initialise(), and whiten().

double* DetectionFunction::m_windowed [private]

Definition at line 87 of file DetectionFunction.h.

Referenced by deInitialise(), initialise(), and processTimeDomain().

Window<double>* DetectionFunction::m_window [private]

Definition at line 92 of file DetectionFunction.h.

Referenced by deInitialise(), initialise(), and processTimeDomain().


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