169 for( i = 0; i < length; i++)
171 val += src[ i ] * ( i + 1);
183 for( i = 0; i < length; i++)
209 for( i = 0; i < length; i++)
245 for( i = 0; i < length; i++)
250 meas =
m_magHistory[i] - ( srcMagnitude[ i ] * exp( j * dev) );
252 tmpReal = real( meas );
253 tmpImag = imag( meas );
255 val += sqrt( (tmpReal * tmpReal) + (tmpImag * tmpImag) );
268 for (
unsigned int i = 0; i < length; ++i) {
269 double sqrmag = src[i] * src[i];
complex< double > ComplexData
double * getSpectrumMagnitude()
PhaseVocoder * m_phaseVoc
unsigned int m_dataLength
double broadband(unsigned int length, double *srcMagnitude)
Window< double > * m_window
double complexSD(unsigned int length, double *srcMagnitude, double *srcPhase)
unsigned int m_halfLength
double specDiff(unsigned int length, double *src)
DetectionFunction(DFConfig Config)
double m_whitenRelaxCoeff
double phaseDev(unsigned int length, double *srcPhase)
void initialise(DFConfig Config)
double processFrequencyDomain(const double *reals, const double *imags)
Process a single frequency-domain frame, provided as frameLength/2+1 real and imaginary component val...
double HFC(unsigned int length, double *src)
double processTimeDomain(const double *samples)
Process a single time-domain frame of audio, provided as frameLength samples.
double * m_phaseHistoryOld
virtual ~DetectionFunction()
static double princarg(double ang)
The principle argument function.
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,...
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,...
Various shaped windows for sample frame conditioning, including cosine windows (Hann etc) and triangu...
double whiteningRelaxCoeff