ofxPDSP
CombFilter.h
1 // CombFilter.h
2 // ofxPDSP
3 // Nicola Pisanti, MIT License, 2016
4 
5 #ifndef PDSP_MODULE_COMBFILTER_H_INCLUDED
6 #define PDSP_MODULE_COMBFILTER_H_INCLUDED
7 
8 #include "../../DSP/pdspCore.h"
9 #include "../../DSP/delays/Delay.h"
10 #include "../../DSP/utility/PitchToFreq.h"
11 #include "../../DSP/utility/FreqToMs.h"
12 
13 
14 namespace pdsp{
20 class CombFilter : public Patchable {
21 
22 public:
23  CombFilter();
24  CombFilter(const CombFilter& other);
25  CombFilter& operator=(const CombFilter& other);
26  ~CombFilter();
27 
32 
37 
42 
47 
52 
57  void channels( size_t size );
58 
63  Patchable& ch( size_t index );
64 
65 
69  float meter_pitch() const;
70 
74  [[deprecated("operator[] deprecated, use the ch( int index ) method instead")]]
75  Patchable& operator[]( size_t index );
76 
77  [[deprecated("in_fb() deprecated, use in_feedback() instead")]]
78  Patchable& in_fb();
82 private:
83 
84  void patch();
85 
86 
87  std::vector<Delay*> delays;
88  PitchToFreq p2f;
89  FreqToMs f2ms;
90 
91  PatchNode fbcontrol;
92  PatchNode dampcontrol;
93 
94 
95 };
96 
97 
98 }
99 
100 #endif //PDSP_MODULE_COMBFILTER_H_INCLUDED
Patchable & ch(size_t index)
Uses the selected channel as input/output for the patching operation.
Definition: CombFilter.cpp:42
Patchable & in_damping()
Sets "damping" as selected input and returns this module ready to be patched. This is the damping of ...
Definition: CombFilter.cpp:65
Patchable & out_signal()
Sets "signal" as selected output and returns this module ready to be patched. This is the default out...
Definition: CombFilter.cpp:53
Patchable & in_pitch()
Sets "pitch" as selected input and returns this module ready to be patched. This is the tuning of the...
Definition: CombFilter.cpp:57
A comb filter is a delay tuned to a specific pitch frequency (mix it with the dry signal)...
Definition: CombFilter.h:20
Abstract class for implementing Units and Modules.
Definition: BasicNodes.h:82
Converts pitch values to frequency values.
Definition: PitchToFreq.h:19
Patchable & in_feedback()
Sets "feedback" as selected input and returns this module ready to be patched. This is the delay feed...
Definition: CombFilter.cpp:61
float meter_pitch() const
returns the actual pitch value.This method is thread-safe.
Definition: CombFilter.cpp:69
output is frequency converted to milliseconds, useful for tuning delays
Definition: FreqToMs.h:18
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
Patchable & in_signal()
Sets "signal" as selected input and returns this module ready to be patched. This is the default inpu...
Definition: CombFilter.cpp:49
void channels(size_t size)
Allocate a number of channels for processing different inputs. This is automatically called if you qu...
Definition: CombFilter.cpp:24