ofxPDSP
PeakEQ.h
1 
2 // PeakEQ.h
3 // ofxPDSP
4 // Nicola Pisanti, MIT License, 2016-2018
5 
6 #ifndef PDSP_MODULE_PEAKEQ_H_INCLUDED
7 #define PDSP_MODULE_PEAKEQ_H_INCLUDED
8 
9 #include "../../DSP/pdspCore.h"
10 #include "../../DSP/filters/biquads/BiquadPeakEQ.h"
11 
12 namespace pdsp{
13 
18 class PeakEQ : public Patchable {
19 
20 public:
21  PeakEQ(){ patch(); };
22  PeakEQ(const PeakEQ& other){ patch(); };
23  PeakEQ& operator=(const PeakEQ& other){ return *this; };
24  ~PeakEQ(){ channels(0); }
25 
30 
35 
39  Patchable& in_freq();
40 
44  Patchable& in_Q();
45 
49  Patchable& in_gain();
50 
51 
56  void channels( size_t size );
57 
62  Patchable& ch( size_t index );
63 
67  [[deprecated("operator[] deprecated, use the ch( int index ) method instead")]]
68  Patchable& operator[]( size_t index );
69 
70  [[deprecated("in_0() deprecated, use the ch( int index ) method instead")]]
71  Patchable& in_0();
72 
73  [[deprecated("in_1() deprecated, use the ch( int index ) method instead")]]
74  Patchable& in_1();
75 
76  [[deprecated("out_0() deprecated, use the ch( int index ) method instead")]]
77  Patchable& out_0();
78 
79  [[deprecated("out_1() deprecated, use the ch( int index ) method instead")]]
80  Patchable& out_1();
86 private:
87  void patch ();
88 
89  PatchNode freq;
90  PatchNode Q;
91  PatchNode gain;
92 
93  std::vector<BiquadPeakEQ*> eqs;
94 
95 };
96 
97 } // pdsp namespace end
98 
99 
100 #endif // PDSP_MODULE_PEAKEQ_H_INCLUDED
Peak Equalizer. Multichannel.
Definition: PeakEQ.h:18
Patchable & ch(size_t index)
Uses the selected channel as input/output for the patching operation.
Definition: PeakEQ.cpp:40
Patchable & in_signal()
Sets "signal" as selected input and returns this module ready to be patched. This is the default inpu...
Definition: PeakEQ.cpp:59
Abstract class for implementing Units and Modules.
Definition: BasicNodes.h:82
Patchable & out_signal()
Sets "signal" as selected output and returns this module ready to be patched. This is the default out...
Definition: PeakEQ.cpp:63
Thread-safe value control with smoothing.
Definition: SequencerBridge.h:11
Patchable & in_gain()
Sets "gain" as selected input and returns this module ready to be patched. This is the amount of gain...
Definition: PeakEQ.cpp:55
Patchable & in_Q()
Sets "Q" as selected input and returns this module ready to be patched. This is the "quality" factor ...
Definition: PeakEQ.cpp:51
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_freq()
Sets "freq" as selected input and returns this module ready to be patched. This is the frequency at w...
Definition: PeakEQ.cpp:47
void channels(size_t size)
Allocate a number of channels for processing different inputs. This is automatically called if you qu...
Definition: PeakEQ.cpp:19