ofxPDSP
BasiVerb.h
1 
2 // BasiVerb.h
3 // ofxPDSP
4 // Nicola Pisanti, MIT License, 2016
5 
6 #ifndef PDSP_MODULE_BASIVERB_H_INCLUDED
7 #define PDSP_MODULE_BASIVERB_H_INCLUDED
8 
9 #include "../../DSP/pdspCore.h"
10 #include "../../DSP/oscillators/phasors/LFOPhasor.h"
11 #include "../../DSP/oscillators/cheap/CheapTri.h"
12 #include "../../DSP/delays/Delay.h"
13 #include "../../DSP/delays/AllPassDelay.h"
14 #include "../../DSP/filters/OnePole.h"
15 #include "../../DSP/filters/APF1.h"
16 #include "../../DSP/utility/BipolarToUnipolar.h"
17 
18 namespace pdsp{
25 class BasiVerb : public Patchable {
26 
27 
28  class RT60Calculator : public Unit{
29 
30  public:
31  RT60Calculator();
32  ~RT60Calculator();
33 
34  InputNode input_rt60;
35  InputNode input_shape;
36  ValueNode delay_times [6];
37  ValueNode delay_g [6];
38 
39 
40  private:
41  void prepareUnit( int expectedBufferSize, double sampleRate ) override;
42  void releaseResources () override;
43  void process (int bufferSize) noexcept override;
44 
45  static const float delay_mult [6];
46  static const float delay_min;
47  static const float delay_range;
48 
49  };
50 
51 public:
52 
53  BasiVerb();
54  BasiVerb(const BasiVerb& other);
55  BasiVerb& operator=(const BasiVerb& other);
56 
57 
62 
66  Patchable& in_time();
67 
72 
77 
82 
87 
92 
97  Patchable& ch( size_t index );
98 
102  float meter_lfo() const;
103 
107  [[deprecated("out_0() deprecated, use ch(0) instead")]]
108  Patchable& out_0();
109 
110  [[deprecated("out_1() deprecated, use ch(1) instead")]]
111  Patchable& out_1();
112 
113  [[deprecated("out_L() deprecated, use ch(0) instead")]]
114  Patchable& out_L();
115 
116  [[deprecated("out_R() deprecated, use ch(1) instead")]]
117  Patchable& out_R();
122 private:
123  void patch();
124 
125  RT60Calculator coeffs;
126 
127  LFOPhasor phasor;
128  CheapTri LFO;
129 
130  Delay delays [6];
131 
132  AllPassDelay APF_1;
133  AllPassDelay APF_2;
134 
135  PatchNode input_signal;
136 
137  PatchNode damping_ctrl;
138  PatchNode hi_cut_ctrl;
139 
140  PatchNode output1;
141  PatchNode output2;
142 
143  OnePole lpf1;
144  OnePole lpf2;
145 
146  BipolarToUnipolar lfoOut;
147  Amp modAmt;
148 
149  APF1 apf1L;
150  APF1 apf1R;
151 
152  static const float damp_mult [6];
153 
154 };
155 
156 
157 } // end namespace
158 
159 
160 
161 #endif // PDSP_MODULE_BASIVERB_H_INCLUDED
float meter_lfo() const
returns a value between 0.0f and 1.0f that rapresent the mod LFO signal. This method is thread-safe...
Definition: BasiVerb.cpp:210
1pole AllPass Filter
Definition: APF1.h:17
Digital Delay with a low pass filter in the feedback path.
Definition: Delay.h:21
Patchable & ch(size_t index)
Uses the selected channel as output for the patching operation. 0 is for the left channel (default ou...
Definition: BasiVerb.cpp:181
non-clocked LFO
Definition: LFO.h:25
Abstract class for implementing Units.
Definition: BasicNodes.h:223
Economic triangle oscillator.
Definition: CheapTri.h:19
Simple phazor for LFOs.
Definition: LFOPhasor.h:22
Patchable & in_mod_freq()
Sets "mod_freq" as selected input and returns this module ready to be patched. This is the frequency ...
Definition: BasiVerb.cpp:173
Patchable & in_time()
Sets "time" as selected input and returns this module ready to be patched. This is the rt60 value...
Definition: BasiVerb.cpp:157
Abstract class for implementing Units and Modules.
Definition: BasicNodes.h:82
Multiply in("signal") for in("mod").
Definition: Amp.h:23
Input of a Unit, process all the connected Outputs and sum them. Has an internal variable state...
Definition: BasicNodes.h:536
Dubby sounding reverb based on Moorer's reverb with added time modulations.
Definition: BasiVerb.h:25
Patchable & in_mod_amount()
Sets "mod_amount" as selected input and returns this module ready to be patched. Mod amount of the re...
Definition: BasiVerb.cpp:177
Thread-safe value control with smoothing.
Definition: SequencerBridge.h:11
Patchable & in_density()
Sets "density" as selected input and returns this module ready to be patched. This is a number rangin...
Definition: BasiVerb.cpp:161
A Unit with no dsp inside, it just pass it's input to the output. Patching float to this Unit is thre...
Definition: PatchNode.h:41
Patchable & in_damping()
Sets "damping" as selected input and returns this module ready to be patched. Use value in the 0...
Definition: BasiVerb.cpp:165
Converts bipolar signals to unipolar.
Definition: BipolarToUnipolar.h:18
Digital Delay with an all pass filter in the feedback path, useful for building reverbs.
Definition: AllPassDelay.h:19
Patchable & in_signal()
Sets "signal" as selected input and returns this module ready to be patched. This is the default inpu...
Definition: BasiVerb.cpp:153
An OutputNode that is always set at control rate with a set value. Setting or patching float to this ...
Definition: BasicNodes.h:490
Patchable & in_hi_cut()
Sets "hi_cut" as selected input and returns this module ready to be patched. This is the frequency of...
Definition: BasiVerb.cpp:169
1 pole high/low pass filter
Definition: OnePole.h:18