cannam@0: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ cannam@0: cannam@0: /* cannam@0: QM DSP Library cannam@0: cannam@0: Centre for Digital Music, Queen Mary, University of London. Chris@84: This file 2005-2006 Christian Landone. Chris@84: Chris@84: This program is free software; you can redistribute it and/or Chris@84: modify it under the terms of the GNU General Public License as Chris@84: published by the Free Software Foundation; either version 2 of the Chris@84: License, or (at your option) any later version. See the file Chris@84: COPYING included with this distribution for more information. cannam@0: */ cannam@0: cannam@0: #ifndef PHASEVOCODER_H cannam@0: #define PHASEVOCODER_H cannam@0: cannam@64: class FFTReal; cannam@0: cannam@0: class PhaseVocoder cannam@0: { cannam@0: public: cannam@64: PhaseVocoder( unsigned int size ); cannam@0: virtual ~PhaseVocoder(); cannam@0: cannam@64: void process( double* src, double* mag, double* theta); cannam@0: cannam@0: protected: cannam@0: void getPhase(unsigned int size, double *theta, double *real, double *imag); cannam@64: // void coreFFT( unsigned int NumSamples, double *RealIn, double* ImagIn, double *RealOut, double *ImagOut); cannam@0: void getMagnitude( unsigned int size, double* mag, double* real, double* imag); cannam@55: void FFTShift( unsigned int size, double* src); cannam@0: cannam@64: unsigned int m_n; cannam@64: FFTReal *m_fft; cannam@64: double *m_imagOut; cannam@64: double *m_realOut; cannam@0: cannam@0: }; cannam@0: cannam@0: #endif