diff dsp/chromagram/ConstantQ.cpp @ 24:2b74bd60c61f

* Various fixes to segmentation code
author cannam
date Thu, 10 Jan 2008 15:14:53 +0000
parents 8bdbda7fb893
children 8bb764969d50
line wrap: on
line diff
--- a/dsp/chromagram/ConstantQ.cpp	Thu Jan 10 15:14:30 2008 +0000
+++ b/dsp/chromagram/ConstantQ.cpp	Thu Jan 10 15:14:53 2008 +0000
@@ -170,14 +170,14 @@
     m_dQ = 1/(pow(2,(1/(double)m_BPO))-1);	// Work out Q value for Filter bank
     m_uK = (unsigned int) ceil(m_BPO * log(m_FMax/m_FMin)/log(2.0));	// No. of constant Q bins
 
-    std::cerr << "ConstantQ::initialise: rate = " << m_FS << ", fmin = " << m_FMin << ", fmax = " << m_FMax << ", bpo = " << m_BPO << ", K = " << m_uK << ", Q = " << m_dQ << std::endl;
+//    std::cerr << "ConstantQ::initialise: rate = " << m_FS << ", fmin = " << m_FMin << ", fmax = " << m_FMax << ", bpo = " << m_BPO << ", K = " << m_uK << ", Q = " << m_dQ << std::endl;
 
     // work out length of fft required for this constant Q Filter bank
     m_FFTLength = (int) pow(2, nextpow2(ceil( m_dQ*m_FS/m_FMin )));
 
     m_hop = m_FFTLength/8; // <------ hop size is window length divided by 32
 
-    std::cerr << "ConstantQ::initialise: -> fft length = " << m_FFTLength << ", hop = " << m_hop << std::endl;
+//    std::cerr << "ConstantQ::initialise: -> fft length = " << m_FFTLength << ", hop = " << m_hop << std::endl;
 
     // allocate memory for cqdata
     m_CQdata = new double [2*m_uK];
@@ -208,7 +208,7 @@
 	const unsigned col = fftbin[i];
 	const double & r1  = real[i];
 	const double & i1  = imag[i];
-	const double & r2  = FFTRe[ m_FFTLength- col];
+	const double & r2  = FFTRe[ m_FFTLength - col];
 	const double & i2  = FFTIm[ m_FFTLength - col];
 	// add the multiplication
 	CQRe[ row ] += (r1*r2 - i1*i2);