ofxPDSP
AALowShelfEQ.h
1 
2 // AALowShelfEQ.h
3 // ofxPDSP
4 // Nicola Pisanti, MIT License, 2016-2018
5 
6 #ifndef PDSP_MODULE_AALOWSHELFEQ_H_INCLUDED
7 #define PDSP_MODULE_AALOWSHELFEQ_H_INCLUDED
8 
9 #include "../../DSP/pdspCore.h"
10 #include "../../DSP/filters/biquads/BiquadLowShelf.h"
11 #include "../../DSP/resamplers/IIRUpSampler2x.h"
12 #include "../../DSP/resamplers/IIRDownSampler2x.h"
13 
14 namespace pdsp{
18 class AALowShelfEQ : public Patchable {
19 
20 
21 
25 class Submodule : public Patchable{
26 public:
27  Submodule();
28 private:
29  BiquadLowShelf eq;
30  IIRUpSampler2x upsampler;
31  IIRDownSampler2x downsampler;
32 };
38 public:
39  AALowShelfEQ(){ patch(); };
40  AALowShelfEQ(const AALowShelfEQ& other){ patch(); };
41  AALowShelfEQ& operator=(const AALowShelfEQ& other){ return *this; };
42  ~AALowShelfEQ(){ 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_LOWSHELFEQAA_H_INCLUDED
Patchable & in_signal()
Sets "signal" as selected input and returns this module ready to be patched. This is the default inpu...
Definition: AALowShelfEQ.cpp:59
Patchable & ch(size_t index)
Uses the selected channel as input/output for the patching operation.
Definition: AALowShelfEQ.cpp:52
void channels(size_t size)
Allocate a number of channels for processing different inputs. This is automatically called if you qu...
Definition: AALowShelfEQ.cpp:31
2x Oversampled Low Shelf Equalizer. Multichannel.
Definition: AALowShelfEQ.h:18
Abstract class for implementing Units and Modules.
Definition: BasicNodes.h:82
Low shelf EQ filter.
Definition: BiquadLowShelf.h:15
Patchable & in_Q()
Sets "Q" as selected input and returns this module ready to be patched. This is the "quality" factor ...
Definition: AALowShelfEQ.cpp:71
Downsample to half the oversampling level.
Definition: IIRDownSampler2x.h:17
Upsample to half the oversampling level.
Definition: IIRUpSampler2x.h:17
Patchable & out_signal()
Sets "signal" as selected output and returns this module ready to be patched. This is the default out...
Definition: AALowShelfEQ.cpp:63
Thread-safe value control with smoothing.
Definition: SequencerBridge.h:11
Patchable & in_freq()
Sets "freq" as selected input and returns this module ready to be patched. This is the frequency at w...
Definition: AALowShelfEQ.cpp:67
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: AALowShelfEQ.cpp:75