Ardour  9.0-pre0-582-g084a23a80d
PhaseVocoder.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 
3 /*
4  QM DSP Library
5 
6  Centre for Digital Music, Queen Mary, University of London.
7  This file 2005-2006 Christian Landone, copyright 2013 QMUL.
8 
9  This program is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public License as
11  published by the Free Software Foundation; either version 2 of the
12  License, or (at your option) any later version. See the file
13  COPYING included with this distribution for more information.
14 */
15 
16 #ifndef PHASEVOCODER_H
17 #define PHASEVOCODER_H
18 
19 class FFTReal;
20 
22 {
23 public:
24  PhaseVocoder(int size, int hop);
25  virtual ~PhaseVocoder();
26 
39  void processTimeDomain(const double *src,
40  double *mag, double *phase, double *unwrapped);
41 
53  void processFrequencyDomain(const double *reals, const double *imags,
54  double *mag, double *phase, double *unwrapped);
55 
62  void reset();
63 
64 protected:
65  void FFTShift(double *src);
66  void getMagnitudes(double *mag);
67  void getPhases(double *theta);
68  void unwrapPhases(double *theta, double *unwrapped);
69 
70  int m_n;
71  int m_hop;
73  double *m_time;
74  double *m_imag;
75  double *m_real;
76  double *m_phase;
77  double *m_unwrapped;
78 };
79 
80 #endif
Definition: FFT.h:53
double * m_phase
Definition: PhaseVocoder.h:76
void getPhases(double *theta)
void getMagnitudes(double *mag)
void processFrequencyDomain(const double *reals, const double *imags, double *mag, double *phase, double *unwrapped)
double * m_real
Definition: PhaseVocoder.h:75
double * m_unwrapped
Definition: PhaseVocoder.h:77
PhaseVocoder(int size, int hop)
double * m_time
Definition: PhaseVocoder.h:73
FFTReal * m_fft
Definition: PhaseVocoder.h:72
void unwrapPhases(double *theta, double *unwrapped)
double * m_imag
Definition: PhaseVocoder.h:74
void FFTShift(double *src)
void processTimeDomain(const double *src, double *mag, double *phase, double *unwrapped)
virtual ~PhaseVocoder()