1 /**
2 Adds a reverberation audio effect to an Audio bus.
3 Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces.
4 
5 Copyright:
6 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.  
7 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)  
8 Copyright (c) 2017-2018 Godot-D contributors  
9 
10 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License)
11 
12 
13 */
14 module godot.audioeffectreverb;
15 import std.meta : AliasSeq, staticIndexOf;
16 import std.traits : Unqual;
17 import godot.d.traits;
18 import godot.core;
19 import godot.c;
20 import godot.d.bind;
21 import godot.d.reference;
22 import godot.globalenums;
23 import godot.object;
24 import godot.classdb;
25 import godot.audioeffect;
26 import godot.resource;
27 /**
28 Adds a reverberation audio effect to an Audio bus.
29 Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces.
30 
31 Simulates rooms of different sizes. Its parameters can be adjusted to simulate the sound of a specific room.
32 */
33 @GodotBaseClass struct AudioEffectReverb
34 {
35 	package(godot) enum string _GODOT_internal_name = "AudioEffectReverb";
36 public:
37 @nogc nothrow:
38 	union { /** */ godot_object _godot_object; /** */ AudioEffect _GODOT_base; }
39 	alias _GODOT_base this;
40 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
41 	package(godot) __gshared bool _classBindingInitialized = false;
42 	package(godot) static struct GDNativeClassBinding
43 	{
44 		__gshared:
45 		@GodotName("get_damping") GodotMethod!(double) getDamping;
46 		@GodotName("get_dry") GodotMethod!(double) getDry;
47 		@GodotName("get_hpf") GodotMethod!(double) getHpf;
48 		@GodotName("get_predelay_feedback") GodotMethod!(double) getPredelayFeedback;
49 		@GodotName("get_predelay_msec") GodotMethod!(double) getPredelayMsec;
50 		@GodotName("get_room_size") GodotMethod!(double) getRoomSize;
51 		@GodotName("get_spread") GodotMethod!(double) getSpread;
52 		@GodotName("get_wet") GodotMethod!(double) getWet;
53 		@GodotName("set_damping") GodotMethod!(void, double) setDamping;
54 		@GodotName("set_dry") GodotMethod!(void, double) setDry;
55 		@GodotName("set_hpf") GodotMethod!(void, double) setHpf;
56 		@GodotName("set_predelay_feedback") GodotMethod!(void, double) setPredelayFeedback;
57 		@GodotName("set_predelay_msec") GodotMethod!(void, double) setPredelayMsec;
58 		@GodotName("set_room_size") GodotMethod!(void, double) setRoomSize;
59 		@GodotName("set_spread") GodotMethod!(void, double) setSpread;
60 		@GodotName("set_wet") GodotMethod!(void, double) setWet;
61 	}
62 	/// 
63 	pragma(inline, true) bool opEquals(in AudioEffectReverb other) const
64 	{ return _godot_object.ptr is other._godot_object.ptr; }
65 	/// 
66 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
67 	{ _godot_object.ptr = n; return null; }
68 	/// 
69 	pragma(inline, true) bool opEquals(typeof(null) n) const
70 	{ return _godot_object.ptr is n; }
71 	/// 
72 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
73 	mixin baseCasts;
74 	/// Construct a new instance of AudioEffectReverb.
75 	/// Note: use `memnew!AudioEffectReverb` instead.
76 	static AudioEffectReverb _new()
77 	{
78 		static godot_class_constructor constructor;
79 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("AudioEffectReverb");
80 		if(constructor is null) return typeof(this).init;
81 		return cast(AudioEffectReverb)(constructor());
82 	}
83 	@disable new(size_t s);
84 	/**
85 	
86 	*/
87 	double getDamping() const
88 	{
89 		checkClassBinding!(typeof(this))();
90 		return ptrcall!(double)(GDNativeClassBinding.getDamping, _godot_object);
91 	}
92 	/**
93 	
94 	*/
95 	double getDry() const
96 	{
97 		checkClassBinding!(typeof(this))();
98 		return ptrcall!(double)(GDNativeClassBinding.getDry, _godot_object);
99 	}
100 	/**
101 	
102 	*/
103 	double getHpf() const
104 	{
105 		checkClassBinding!(typeof(this))();
106 		return ptrcall!(double)(GDNativeClassBinding.getHpf, _godot_object);
107 	}
108 	/**
109 	
110 	*/
111 	double getPredelayFeedback() const
112 	{
113 		checkClassBinding!(typeof(this))();
114 		return ptrcall!(double)(GDNativeClassBinding.getPredelayFeedback, _godot_object);
115 	}
116 	/**
117 	
118 	*/
119 	double getPredelayMsec() const
120 	{
121 		checkClassBinding!(typeof(this))();
122 		return ptrcall!(double)(GDNativeClassBinding.getPredelayMsec, _godot_object);
123 	}
124 	/**
125 	
126 	*/
127 	double getRoomSize() const
128 	{
129 		checkClassBinding!(typeof(this))();
130 		return ptrcall!(double)(GDNativeClassBinding.getRoomSize, _godot_object);
131 	}
132 	/**
133 	
134 	*/
135 	double getSpread() const
136 	{
137 		checkClassBinding!(typeof(this))();
138 		return ptrcall!(double)(GDNativeClassBinding.getSpread, _godot_object);
139 	}
140 	/**
141 	
142 	*/
143 	double getWet() const
144 	{
145 		checkClassBinding!(typeof(this))();
146 		return ptrcall!(double)(GDNativeClassBinding.getWet, _godot_object);
147 	}
148 	/**
149 	
150 	*/
151 	void setDamping(in double amount)
152 	{
153 		checkClassBinding!(typeof(this))();
154 		ptrcall!(void)(GDNativeClassBinding.setDamping, _godot_object, amount);
155 	}
156 	/**
157 	
158 	*/
159 	void setDry(in double amount)
160 	{
161 		checkClassBinding!(typeof(this))();
162 		ptrcall!(void)(GDNativeClassBinding.setDry, _godot_object, amount);
163 	}
164 	/**
165 	
166 	*/
167 	void setHpf(in double amount)
168 	{
169 		checkClassBinding!(typeof(this))();
170 		ptrcall!(void)(GDNativeClassBinding.setHpf, _godot_object, amount);
171 	}
172 	/**
173 	
174 	*/
175 	void setPredelayFeedback(in double feedback)
176 	{
177 		checkClassBinding!(typeof(this))();
178 		ptrcall!(void)(GDNativeClassBinding.setPredelayFeedback, _godot_object, feedback);
179 	}
180 	/**
181 	
182 	*/
183 	void setPredelayMsec(in double msec)
184 	{
185 		checkClassBinding!(typeof(this))();
186 		ptrcall!(void)(GDNativeClassBinding.setPredelayMsec, _godot_object, msec);
187 	}
188 	/**
189 	
190 	*/
191 	void setRoomSize(in double size)
192 	{
193 		checkClassBinding!(typeof(this))();
194 		ptrcall!(void)(GDNativeClassBinding.setRoomSize, _godot_object, size);
195 	}
196 	/**
197 	
198 	*/
199 	void setSpread(in double amount)
200 	{
201 		checkClassBinding!(typeof(this))();
202 		ptrcall!(void)(GDNativeClassBinding.setSpread, _godot_object, amount);
203 	}
204 	/**
205 	
206 	*/
207 	void setWet(in double amount)
208 	{
209 		checkClassBinding!(typeof(this))();
210 		ptrcall!(void)(GDNativeClassBinding.setWet, _godot_object, amount);
211 	}
212 	/**
213 	Defines how reflective the imaginary room's walls are. Value can range from 0 to 1.
214 	*/
215 	@property double damping()
216 	{
217 		return getDamping();
218 	}
219 	/// ditto
220 	@property void damping(double v)
221 	{
222 		setDamping(v);
223 	}
224 	/**
225 	Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1.
226 	*/
227 	@property double dry()
228 	{
229 		return getDry();
230 	}
231 	/// ditto
232 	@property void dry(double v)
233 	{
234 		setDry(v);
235 	}
236 	/**
237 	High-pass filter passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. Value can range from 0 to 1.
238 	*/
239 	@property double hipass()
240 	{
241 		return getHpf();
242 	}
243 	/// ditto
244 	@property void hipass(double v)
245 	{
246 		setHpf(v);
247 	}
248 	/**
249 	Output percent of predelay. Value can range from 0 to 1.
250 	*/
251 	@property double predelayFeedback()
252 	{
253 		return getPredelayFeedback();
254 	}
255 	/// ditto
256 	@property void predelayFeedback(double v)
257 	{
258 		setPredelayFeedback(v);
259 	}
260 	/**
261 	Time between the original signal and the early reflections of the reverb signal, in milliseconds.
262 	*/
263 	@property double predelayMsec()
264 	{
265 		return getPredelayMsec();
266 	}
267 	/// ditto
268 	@property void predelayMsec(double v)
269 	{
270 		setPredelayMsec(v);
271 	}
272 	/**
273 	Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1.
274 	*/
275 	@property double roomSize()
276 	{
277 		return getRoomSize();
278 	}
279 	/// ditto
280 	@property void roomSize(double v)
281 	{
282 		setRoomSize(v);
283 	}
284 	/**
285 	Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1.
286 	*/
287 	@property double spread()
288 	{
289 		return getSpread();
290 	}
291 	/// ditto
292 	@property void spread(double v)
293 	{
294 		setSpread(v);
295 	}
296 	/**
297 	Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1.
298 	*/
299 	@property double wet()
300 	{
301 		return getWet();
302 	}
303 	/// ditto
304 	@property void wet(double v)
305 	{
306 		setWet(v);
307 	}
308 }