ofxPDSP
AAPeakEQ.h
1 
2 // AAPeakEQ.h
3 // ofxPDSP
4 // Nicola Pisanti, MIT License, 2016-2018
5 
6 #ifndef PDSP_MODULE_AAPEAKEQ_H_INCLUDED
7 #define PDSP_MODULE_AAPEAKEQ_H_INCLUDED
8 
9 #include "../../DSP/pdspCore.h"
10 #include "../../DSP/filters/biquads/BiquadPeakEQ.h"
11 #include "../../DSP/resamplers/IIRUpSampler2x.h"
12 #include "../../DSP/resamplers/IIRDownSampler2x.h"
13 
14 namespace pdsp{
18 class AAPeakEQ : public Patchable {
19 
20 
21 
25 class Submodule : public Patchable{
26 public:
27  Submodule();
28 private:
29  BiquadPeakEQ eq;
30  IIRUpSampler2x upsampler;
31  IIRDownSampler2x downsampler;
32 };
38 public:
39  AAPeakEQ(){ patch(); };
40  AAPeakEQ(const AAPeakEQ& other){ patch(); };
41  AAPeakEQ& operator=(const AAPeakEQ& other){ return *this; };
42  ~AAPeakEQ(){ channels(0); }
43 
48 
53 
57  Patchable& in_freq();
58 
62  Patchable& in_Q();
63 
67  Patchable& in_gain();
68 
73  void channels( size_t size );
74 
79  Patchable& ch( size_t index );
80 
84  [[deprecated("operator[] deprecated, use the ch( int index ) method instead")]]
85  Patchable& operator[]( size_t index );
86 
87  [[deprecated("in_0() deprecated, use the ch( int index ) method instead")]]
88  Patchable& in_0();
89 
90  [[deprecated("in_1() deprecated, use the ch( int index ) method instead")]]
91  Patchable& in_1();
92 
93  [[deprecated("out_0() deprecated, use the ch( int index ) method instead")]]
94  Patchable& out_0();
95 
96  [[deprecated("out_1() deprecated, use the ch( int index ) method instead")]]
97  Patchable& out_1();
103 private:
104  void patch ();
105 
106  PatchNode freq;
107  PatchNode Q;
108  PatchNode gain;
109 
110  std::vector<Submodule*> submodules;
111 
112 };
113 
114 } // pdsp namespace end
115 
116 
117 #endif // PDSP_MODULE_AAPEAKEQ_H_INCLUDED
void channels(size_t size)
Allocate a number of channels for processing different inputs. This is automatically called if you qu...
Definition: AAPeakEQ.cpp:31
Patchable & out_signal()
Sets "signal" as selected output and returns this module ready to be patched. This is the default out...
Definition: AAPeakEQ.cpp:63
2x Oversampled Peak Equalizer. Multichannel.
Definition: AAPeakEQ.h:18
Patchable & ch(size_t index)
Uses the selected channel as input/output for the patching operation.
Definition: AAPeakEQ.cpp:52
Peaking EQ filter with variable Q.
Definition: BiquadPeakEQ.h:15
Abstract class for implementing Units and Modules.
Definition: BasicNodes.h:82
Downsample to half the oversampling level.
Definition: IIRDownSampler2x.h:17
Upsample to half the oversampling level.
Definition: IIRUpSampler2x.h:17
Thread-safe value control with smoothing.
Definition: SequencerBridge.h:11
Patchable & in_signal()
Sets "signal" as selected input and returns this module ready to be patched. This is the default inpu...
Definition: AAPeakEQ.cpp:59
A Unit with no dsp inside, it just pass it&#39;s input to the output. Patching float to this Unit is thre...
Definition: PatchNode.h:41
Patchable & in_gain()
Sets "gain" as selected input and returns this module ready to be patched. This is the amount of gain...
Definition: AAPeakEQ.cpp:75
Patchable & in_freq()
Sets "freq" as selected input and returns this module ready to be patched. This is the frequency at w...
Definition: AAPeakEQ.cpp:67
Patchable & in_Q()
Sets "Q" as selected input and returns this module ready to be patched. This is the "quality" factor ...
Definition: AAPeakEQ.cpp:71