ofxPDSP
LowShelfEQ.h
1 
2 // LowShelfEQ.h
3 // ofxPDSP
4 // Nicola Pisanti, MIT License, 2016-2018
5 
6 #ifndef PDSP_MODULE_LOWSHELFEQ_H_INCLUDED
7 #define PDSP_MODULE_LOWSHELFEQ_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{
15 
20 class LowShelfEQ : public Patchable {
21 
22 
23 public:
24  LowShelfEQ(){ patch(); };
25  LowShelfEQ(const LowShelfEQ& other){ patch(); };
26  LowShelfEQ& operator=(const LowShelfEQ& other){ return *this; };
27  ~LowShelfEQ(){ channels(0); }
28 
33 
38 
42  Patchable& in_freq();
43 
47  Patchable& in_Q();
48 
52  Patchable& in_gain();
53 
54 
59  void channels( size_t size );
60 
65  Patchable& ch( size_t index );
66 
70  [[deprecated("operator[] deprecated, use the ch( int index ) method instead")]]
71  Patchable& operator[]( size_t index );
72 
73  [[deprecated("in_0() deprecated, use the ch( int index ) method instead")]]
74  Patchable& in_0();
75 
76  [[deprecated("in_1() deprecated, use the ch( int index ) method instead")]]
77  Patchable& in_1();
78 
79  [[deprecated("out_0() deprecated, use the ch( int index ) method instead")]]
80  Patchable& out_0();
81 
82  [[deprecated("out_1() deprecated, use the ch( int index ) method instead")]]
83  Patchable& out_1();
89 private:
90  void patch ();
91 
92  PatchNode freq;
93  PatchNode Q;
94  PatchNode gain;
95 
96  std::vector<BiquadLowShelf*> eqs;
97 
98 };
99 
100 } // pdsp namespace end
101 
102 
103 #endif // PDSP_MODULE_LOWSHELFEQ_H_INCLUDED
void channels(size_t size)
Allocate a number of channels for processing different inputs. This is automatically called if you qu...
Definition: LowShelfEQ.cpp:19
Patchable & in_gain()
Sets "gain" as selected input and returns this module ready to be patched. This is the amount of gain...
Definition: LowShelfEQ.cpp:55
Patchable & in_signal()
Sets "signal" as selected input and returns this module ready to be patched. This is the default inpu...
Definition: LowShelfEQ.cpp:59
Low Shelf Equalizer. Multichannel.
Definition: LowShelfEQ.h:20
Patchable & in_Q()
Sets "Q" as selected input and returns this module ready to be patched. This is the "quality" factor ...
Definition: LowShelfEQ.cpp:51
Abstract class for implementing Units and Modules.
Definition: BasicNodes.h:82
Patchable & in_freq()
Sets "freq" as selected input and returns this module ready to be patched. This is the frequency at w...
Definition: LowShelfEQ.cpp:47
Patchable & ch(size_t index)
Uses the selected channel as input/output for the patching operation.
Definition: LowShelfEQ.cpp:40
Patchable & out_signal()
Sets "signal" as selected output and returns this module ready to be patched. This is the default out...
Definition: LowShelfEQ.cpp:63
Thread-safe value control with smoothing.
Definition: SequencerBridge.h:11
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