annotate dsp/phasevocoder/PhaseVocoder.h @ 64:6cb2b3cd5356
* Refactor FFT a little bit so as to separate construction and processing
rather than have a single static method -- will make it easier to use a
different implementation
* pull in KissFFT implementation (not hooked up yet)
author |
cannam |
date |
Wed, 13 May 2009 09:19:12 +0000 |
parents |
7fe29d8a7eaf |
children |
e5907ae6de17 |
rev |
line source |
cannam@0
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
cannam@0
|
2
|
cannam@0
|
3 /*
|
cannam@0
|
4 QM DSP Library
|
cannam@0
|
5
|
cannam@0
|
6 Centre for Digital Music, Queen Mary, University of London.
|
cannam@0
|
7 This file copyright 2005-2006 Christian Landone.
|
cannam@0
|
8 All rights reserved.
|
cannam@0
|
9 */
|
cannam@0
|
10
|
cannam@0
|
11 #ifndef PHASEVOCODER_H
|
cannam@0
|
12 #define PHASEVOCODER_H
|
cannam@0
|
13
|
cannam@64
|
14 class FFTReal;
|
cannam@0
|
15
|
cannam@0
|
16 class PhaseVocoder
|
cannam@0
|
17 {
|
cannam@0
|
18 public:
|
cannam@64
|
19 PhaseVocoder( unsigned int size );
|
cannam@0
|
20 virtual ~PhaseVocoder();
|
cannam@0
|
21
|
cannam@64
|
22 void process( double* src, double* mag, double* theta);
|
cannam@0
|
23
|
cannam@0
|
24 protected:
|
cannam@0
|
25 void getPhase(unsigned int size, double *theta, double *real, double *imag);
|
cannam@64
|
26 // void coreFFT( unsigned int NumSamples, double *RealIn, double* ImagIn, double *RealOut, double *ImagOut);
|
cannam@0
|
27 void getMagnitude( unsigned int size, double* mag, double* real, double* imag);
|
cannam@55
|
28 void FFTShift( unsigned int size, double* src);
|
cannam@0
|
29
|
cannam@64
|
30 unsigned int m_n;
|
cannam@64
|
31 FFTReal *m_fft;
|
cannam@64
|
32 double *m_imagOut;
|
cannam@64
|
33 double *m_realOut;
|
cannam@0
|
34
|
cannam@0
|
35 };
|
cannam@0
|
36
|
cannam@0
|
37 #endif
|