168 for( i = 0; i < length; i++)
170 val += src[ i ] * ( i + 1);
182 for( i = 0; i < length; i++)
208 for( i = 0; i < length; i++)
244 for( i = 0; i < length; i++)
249 meas =
m_magHistory[i] - ( srcMagnitude[ i ] * exp( j * dev) );
251 tmpReal = real( meas );
252 tmpImag = imag( meas );
254 val += sqrt( (tmpReal * tmpReal) + (tmpImag * tmpImag) );
267 for (
unsigned int i = 0; i < length; ++i) {
268 double sqrmag = src[i] * src[i];
double phaseDev(unsigned int length, double *srcPhase)
double processFrequencyDomain(const double *reals, const double *imags)
Process a single frequency-domain frame, provided as frameLength/2+1 real and imaginary component val...
Window< double > * m_window
double specDiff(unsigned int length, double *src)
unsigned int m_halfLength
double processTimeDomain(const double *samples)
Process a single time-domain frame of audio, provided as frameLength samples.
void processTimeDomain(const double *src, double *mag, double *phase, double *unwrapped)
Given one frame of time-domain samples, FFT and return the magnitudes, instantaneous phases...
void initialise(DFConfig Config)
PhaseVocoder * m_phaseVoc
double m_whitenRelaxCoeff
unsigned int m_dataLength
double complexSD(unsigned int length, double *srcMagnitude, double *srcPhase)
static double princarg(double ang)
The principle argument function.
double whiteningRelaxCoeff
DetectionFunction(DFConfig Config)
virtual ~DetectionFunction()
complex< double > ComplexData
double * m_phaseHistoryOld
void processFrequencyDomain(const double *reals, const double *imags, double *mag, double *phase, double *unwrapped)
Given one frame of frequency-domain samples, return the magnitudes, instantaneous phases...
double * getSpectrumMagnitude()
double HFC(unsigned int length, double *src)
double broadband(unsigned int length, double *srcMagnitude)