diff FIRFilter.cpp @ 14:c11367df624d

* Renamed NoveltyCurve.* and Spectrogram.* to $(Name)Processor.* * Aligned novelty curve with audio - when performing FIRFilter::process(params), take inputLength after group delay. * Removed trail of Spectrogram. * General tidying!
author Carl Bussey <c.bussey@se10.qmul.ac.uk>
date Thu, 14 Aug 2014 10:31:49 +0100
parents 7680cc4c0073
children 203551cbad47
line wrap: on
line diff
--- a/FIRFilter.cpp	Wed Aug 13 14:18:00 2014 +0100
+++ b/FIRFilter.cpp	Thu Aug 14 10:31:49 2014 +0100
@@ -77,8 +77,10 @@
     FFT::inverse(m_lengthFIRFFT, m_pFftFilteredReal, m_pFftFilteredImag, m_pFftOutputReal, m_pFftOutputImag);
     
     //copy to output
+    int offset = ceil(m_numberOfCoefficients/2);
+    //int offset = 0;
     for (unsigned int i = 0; i < m_lengthInput; i++){
-        pOutput[i] = m_pFftOutputReal[i];
+        pOutput[i] = m_pFftOutputReal[i + offset];
     }
 }