Pd++  0.01
A pure C++ implementation of Pure Data objects
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
rIFFT.h
1 /*
2  rIFFT.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 #ifndef __Pd____rIFFT__
14 #define __Pd____rIFFT__
15 
16 #include <string>
17 #include "PdMaster.h"
18 #include "fft.h"
19 
20 namespace pd {
21 
22 /*! \brief Real Inverse Fast Fourier Transform.
23 
24  This is an emulation of the rifft~ object. It takes a window of
25  samples and resynthesizes them back into the time domain.
26  This is different from several other Pd++ classes as it
27  accepts a double*, which is a c-style reference to our input window.
28  Real Inverse Fast Fourier Transform only provides the real (or cosine part I believe)
29  of an FFT. See FFT or fft_mayer.c for more information on the algorithm.
30 
31 */
32 
33 class realIFFT : public PdMaster, public FFT {
34 
35 private:
36  int windowSize = 64;
37  double *signal = nullptr;
38  bool first = true;
39  int count = 0;
40 
41 
42 public:
43  realIFFT();
44  realIFFT(int);
45  ~realIFFT();
46 
47  double perform(double *input);
48 
49  const std::string pdName = "rifft~";
50 };
51 
52 
53 
54 } // pd namespace
55 
56 #endif /* defined(__Pd____rFFT__) */
57 
The Pd++ namespace.
Definition: BandPass.cpp:14
A super class inherited by all Pd++ objects.
Definition: PdMaster.h:62
realIFFT()
Definition: rIFFT.cpp:32
An FFT superclass. Adapted from the Pd version of FFT.
Definition: fft.h:125
Real Inverse Fast Fourier Transform.
Definition: rIFFT.h:33