1 /**
2 Adds a Reverb 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.meta;
18 import godot.core;
19 import godot.c;
20 import godot.d.bind;
21 import godot.d.reference;
22 import godot.object;
23 import godot.classdb;
24 import godot.audioeffect;
25 import godot.resource;
26 import godot.reference;
27 /**
28 Adds a Reverb 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 	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 _classBinding
43 	{
44 		__gshared:
45 		@GodotName("set_predelay_msec") GodotMethod!(void, double) setPredelayMsec;
46 		@GodotName("get_predelay_msec") GodotMethod!(double) getPredelayMsec;
47 		@GodotName("set_predelay_feedback") GodotMethod!(void, double) setPredelayFeedback;
48 		@GodotName("get_predelay_feedback") GodotMethod!(double) getPredelayFeedback;
49 		@GodotName("set_room_size") GodotMethod!(void, double) setRoomSize;
50 		@GodotName("get_room_size") GodotMethod!(double) getRoomSize;
51 		@GodotName("set_damping") GodotMethod!(void, double) setDamping;
52 		@GodotName("get_damping") GodotMethod!(double) getDamping;
53 		@GodotName("set_spread") GodotMethod!(void, double) setSpread;
54 		@GodotName("get_spread") GodotMethod!(double) getSpread;
55 		@GodotName("set_dry") GodotMethod!(void, double) setDry;
56 		@GodotName("get_dry") GodotMethod!(double) getDry;
57 		@GodotName("set_wet") GodotMethod!(void, double) setWet;
58 		@GodotName("get_wet") GodotMethod!(double) getWet;
59 		@GodotName("set_hpf") GodotMethod!(void, double) setHpf;
60 		@GodotName("get_hpf") GodotMethod!(double) getHpf;
61 	}
62 	bool opEquals(in AudioEffectReverb other) const { return _godot_object.ptr is other._godot_object.ptr; }
63 	AudioEffectReverb opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
64 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
65 	mixin baseCasts;
66 	static AudioEffectReverb _new()
67 	{
68 		static godot_class_constructor constructor;
69 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("AudioEffectReverb");
70 		if(constructor is null) return typeof(this).init;
71 		return cast(AudioEffectReverb)(constructor());
72 	}
73 	@disable new(size_t s);
74 	/**
75 	
76 	*/
77 	void setPredelayMsec(in double msec)
78 	{
79 		checkClassBinding!(typeof(this))();
80 		ptrcall!(void)(_classBinding.setPredelayMsec, _godot_object, msec);
81 	}
82 	/**
83 	
84 	*/
85 	double getPredelayMsec() const
86 	{
87 		checkClassBinding!(typeof(this))();
88 		return ptrcall!(double)(_classBinding.getPredelayMsec, _godot_object);
89 	}
90 	/**
91 	
92 	*/
93 	void setPredelayFeedback(in double feedback)
94 	{
95 		checkClassBinding!(typeof(this))();
96 		ptrcall!(void)(_classBinding.setPredelayFeedback, _godot_object, feedback);
97 	}
98 	/**
99 	
100 	*/
101 	double getPredelayFeedback() const
102 	{
103 		checkClassBinding!(typeof(this))();
104 		return ptrcall!(double)(_classBinding.getPredelayFeedback, _godot_object);
105 	}
106 	/**
107 	
108 	*/
109 	void setRoomSize(in double size)
110 	{
111 		checkClassBinding!(typeof(this))();
112 		ptrcall!(void)(_classBinding.setRoomSize, _godot_object, size);
113 	}
114 	/**
115 	
116 	*/
117 	double getRoomSize() const
118 	{
119 		checkClassBinding!(typeof(this))();
120 		return ptrcall!(double)(_classBinding.getRoomSize, _godot_object);
121 	}
122 	/**
123 	
124 	*/
125 	void setDamping(in double amount)
126 	{
127 		checkClassBinding!(typeof(this))();
128 		ptrcall!(void)(_classBinding.setDamping, _godot_object, amount);
129 	}
130 	/**
131 	
132 	*/
133 	double getDamping() const
134 	{
135 		checkClassBinding!(typeof(this))();
136 		return ptrcall!(double)(_classBinding.getDamping, _godot_object);
137 	}
138 	/**
139 	
140 	*/
141 	void setSpread(in double amount)
142 	{
143 		checkClassBinding!(typeof(this))();
144 		ptrcall!(void)(_classBinding.setSpread, _godot_object, amount);
145 	}
146 	/**
147 	
148 	*/
149 	double getSpread() const
150 	{
151 		checkClassBinding!(typeof(this))();
152 		return ptrcall!(double)(_classBinding.getSpread, _godot_object);
153 	}
154 	/**
155 	
156 	*/
157 	void setDry(in double amount)
158 	{
159 		checkClassBinding!(typeof(this))();
160 		ptrcall!(void)(_classBinding.setDry, _godot_object, amount);
161 	}
162 	/**
163 	
164 	*/
165 	double getDry() const
166 	{
167 		checkClassBinding!(typeof(this))();
168 		return ptrcall!(double)(_classBinding.getDry, _godot_object);
169 	}
170 	/**
171 	
172 	*/
173 	void setWet(in double amount)
174 	{
175 		checkClassBinding!(typeof(this))();
176 		ptrcall!(void)(_classBinding.setWet, _godot_object, amount);
177 	}
178 	/**
179 	
180 	*/
181 	double getWet() const
182 	{
183 		checkClassBinding!(typeof(this))();
184 		return ptrcall!(double)(_classBinding.getWet, _godot_object);
185 	}
186 	/**
187 	
188 	*/
189 	void setHpf(in double amount)
190 	{
191 		checkClassBinding!(typeof(this))();
192 		ptrcall!(void)(_classBinding.setHpf, _godot_object, amount);
193 	}
194 	/**
195 	
196 	*/
197 	double getHpf() const
198 	{
199 		checkClassBinding!(typeof(this))();
200 		return ptrcall!(double)(_classBinding.getHpf, _godot_object);
201 	}
202 	/**
203 	Time between the original signal and the early reflections of the reverb signal. Default value: `150ms`.
204 	*/
205 	@property double predelayMsec()
206 	{
207 		return getPredelayMsec();
208 	}
209 	/// ditto
210 	@property void predelayMsec(double v)
211 	{
212 		setPredelayMsec(v);
213 	}
214 	/**
215 	Output percent of predelay. Value can range from 0 to 1. Default value: `1`.
216 	*/
217 	@property double predelayFeedback()
218 	{
219 		return getPredelayFeedback();
220 	}
221 	/// ditto
222 	@property void predelayFeedback(double v)
223 	{
224 		setPredelayFeedback(v);
225 	}
226 	/**
227 	Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1. Default value: `0.8`.
228 	*/
229 	@property double roomSize()
230 	{
231 		return getRoomSize();
232 	}
233 	/// ditto
234 	@property void roomSize(double v)
235 	{
236 		setRoomSize(v);
237 	}
238 	/**
239 	Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1. Default value: `1`.
240 	*/
241 	@property double damping()
242 	{
243 		return getDamping();
244 	}
245 	/// ditto
246 	@property void damping(double v)
247 	{
248 		setDamping(v);
249 	}
250 	/**
251 	Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. Default value: `1`.
252 	*/
253 	@property double spread()
254 	{
255 		return getSpread();
256 	}
257 	/// ditto
258 	@property void spread(double v)
259 	{
260 		setSpread(v);
261 	}
262 	/**
263 	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. Default value: `0`.
264 	*/
265 	@property double hipass()
266 	{
267 		return getHpf();
268 	}
269 	/// ditto
270 	@property void hipass(double v)
271 	{
272 		setHpf(v);
273 	}
274 	/**
275 	Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1. Default value: `1`.
276 	*/
277 	@property double dry()
278 	{
279 		return getDry();
280 	}
281 	/// ditto
282 	@property void dry(double v)
283 	{
284 		setDry(v);
285 	}
286 	/**
287 	Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. Default value: `0.5`.
288 	*/
289 	@property double wet()
290 	{
291 		return getWet();
292 	}
293 	/// ditto
294 	@property void wet(double v)
295 	{
296 		setWet(v);
297 	}
298 }