YSE sound engine  1.0
cross platform sound engine
 All Classes Namespaces Functions Pages
reverbInterface.hpp
1 /*
2  ==============================================================================
3 
4  reverb.h
5  Created: 1 Feb 2014 7:02:58pm
6  Author: yvan
7 
8  ==============================================================================
9 */
10 
11 #ifndef REVERBINTERFACE_H_INCLUDED
12 #define REVERBINTERFACE_H_INCLUDED
13 
14 #include "../headers/defines.hpp"
15 #include "../headers/enums.hpp"
16 #include "../templates/interfaceObject.hpp"
17 #include "../utils/vector.hpp"
18 
19 namespace YSE {
20 
21  namespace REVERB {
22 
33  class API interfaceObject {
34  public:
39  interfaceObject(Bool global = false);
40  ~interfaceObject();
41 
46  void create();
47  Bool isValid();
48 
52  interfaceObject& setPosition(const Vec &value);
53 
57  Vec getPosition();
58 
63  interfaceObject& setSize(Flt value);
64 
68  Flt getSize();
69 
76  interfaceObject& setRollOff(Flt value);
77 
81  Flt getRollOff();
82 
86  interfaceObject& setActive(Bool value);
87 
91  Bool getActive();
92 
96  interfaceObject& setRoomSize(Flt value);
97 
101  Flt getRoomSize();
102 
106  interfaceObject& setDamping(Flt value);
107 
111  Flt getDamping();
112 
113 
126  interfaceObject& setDryWetBalance(Flt dry, Flt wet);
127 
131  Flt getWet();
132 
136  Flt getDry();
137 
145  interfaceObject& setModulation(Flt frequency, Flt width);
146 
150  Flt getModulationFrequency();
151 
155  Flt getModulationWidth();
156 
167  interfaceObject& setReflection(Int reflection, Int time, Flt gain);
168 
174  Int getReflectionTime(Int reflection);
175 
181  Flt getReflectionGain(Int reflection);
182 
186  interfaceObject& setPreset(REVERB_PRESET value);
187 
192  interfaceObject& release();
193 
194 
195 
196  private:
197  implementationObject * pimpl;
198 
199  Bool connectedToManager;
200  Bool active;
201 
202  Flt roomsize, damp, wet, dry;
203 
204  Flt modFrequency, modWidth; // modulation
205 
206  Int earlyPtr[4]; // early reflections
207  Flt earlyGain[4];
208 
209  Vec position;
210  Flt size, rolloff;
211 
212  REVERB_PRESET preset;
213 
214  Bool global;
215  friend class managerObject;
216  friend class implementationObject;
217  };
218  }
219 }
220 
221 
222 
223 #endif // REVERB_H_INCLUDED
Reverb objects are actually just a collection of reverb settings.