Pd++  0.01
A pure C++ implementation of Pure Data objects
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
cFFT.h
1 /*
2  rFFT.cpp
3  Pd++
4 
5  Created by Rob Esler on 9/29/14.
6  Copyright (c) 2014 Robert Esler. All rights reserved.
7 
8  Some of the code in Pd++ is Copyright (c) 1997-1999 Miller Puckette.
9  For information on usage and redistribution, and for a DISCLAIMER OF ALL
10  WARRANTIES, see the file, "LICENSE.txt," in this distribution.
11 
12 */
13 
14 #ifndef __Pd____cFFT__
15 #define __Pd____cFFT__
16 
17 #include <string>
18 #include "PdMaster.h"
19 #include "fft.h"
20 
21 namespace pd {
22 
23 
24 /*! \brief Complex Fast Fourier Transform
25 
26  Outputs a window, or block of samples based on the FFT window.
27  Complex FFT returns the real and imaginary parts via a struct.
28 
29 */
30 
31 class complexFFT : public PdMaster, public FFT {
32 
33 private:
34  int windowSize = 64;
35  double *realFFT = nullptr;
36  double *imagFFT = nullptr;
37  double *output = nullptr;
38  int count = 0;
39 
40 public:
41  complexFFT();
42  complexFFT(int);
43  ~complexFFT();
44  /*! This function returns a block of complex samples, which are the real and imaginary parts.*/
45  double *perform(double real, double imaginary);
46 
47  const std::string pdName = "fft~";
48 };
49 
50 
51 
52 } // pd namespace
53 
54 #endif /* defined(__Pd____cFFT__) */
The Pd++ namespace.
Definition: BandPass.cpp:14
A super class inherited by all Pd++ objects.
Definition: PdMaster.h:62
An FFT superclass. Adapted from the Pd version of FFT.
Definition: fft.h:125
complexFFT()
Definition: cFFT.cpp:26
double * perform(double real, double imaginary)
Definition: cFFT.cpp:78
Real Fast Fourier Transform.
Definition: rFFT.h:28
Complex Fast Fourier Transform.
Definition: cFFT.h:31