Pd++  0.01
A pure C++ implementation of Pure Data objects
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
HighPass.h
1 /*
2  HighPass.cpp
3  Pd++
4 
5  Created by Robert Esler on 10/18/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____HighPass__
14 #define __Pd____HighPass__
15 
16 #include <string>
17 #include "PdMaster.h"
18 
19 namespace pd {
20 
21 /*! \brief One-pole high pass filter.
22 
23  Use setCutOff() to adjust cutoff freq. Use clear() to reset the
24  filter's internal state.
25  In my version I have slightly changed the normaling equation to avoid going out of
26  range.
27 
28 
29 */
30 
31 class HighPass : public PdMaster {
32 
33 private:
34  typedef struct hipctl
35  {
36  double c_x;
37  double c_coef;
38  } t_hipctl;
39 
40  typedef struct sighip
41  {
42  double x_sr;
43  double x_hz;
44  t_hipctl x_cspace;
45  t_hipctl *x_ctl;
46  double x_f;
47  } t_sighip;
48 
49  t_sighip *x = new t_sighip;
50 
51 public:
52 
53  HighPass();
54  HighPass(double cutOff);
55  ~HighPass();
56  double perform(double input);
57  void setCutOff(double f);
58  void clear(double q);
59 
60 
61  std::string pdName = "hip~";
62 };
63 
64 
65 } // pd namespace
66 #endif /* defined(__Pd____HighPass__) */
The Pd++ namespace.
Definition: BandPass.cpp:14
A super class inherited by all Pd++ objects.
Definition: PdMaster.h:62
One-pole high pass filter.
Definition: HighPass.h:31