1 /** 2 Adds a Phaser audio effect to an Audio bus. 3 Combines the original signal with a copy that is slightly out of phase with the original. 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.audioeffectphaser; 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 Phaser audio effect to an Audio bus. 29 Combines the original signal with a copy that is slightly out of phase with the original. 30 31 Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a Low Frequency Oscillator. 32 */ 33 @GodotBaseClass struct AudioEffectPhaser 34 { 35 enum string _GODOT_internal_name = "AudioEffectPhaser"; 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_range_min_hz") GodotMethod!(void, double) setRangeMinHz; 46 @GodotName("get_range_min_hz") GodotMethod!(double) getRangeMinHz; 47 @GodotName("set_range_max_hz") GodotMethod!(void, double) setRangeMaxHz; 48 @GodotName("get_range_max_hz") GodotMethod!(double) getRangeMaxHz; 49 @GodotName("set_rate_hz") GodotMethod!(void, double) setRateHz; 50 @GodotName("get_rate_hz") GodotMethod!(double) getRateHz; 51 @GodotName("set_feedback") GodotMethod!(void, double) setFeedback; 52 @GodotName("get_feedback") GodotMethod!(double) getFeedback; 53 @GodotName("set_depth") GodotMethod!(void, double) setDepth; 54 @GodotName("get_depth") GodotMethod!(double) getDepth; 55 } 56 bool opEquals(in AudioEffectPhaser other) const { return _godot_object.ptr is other._godot_object.ptr; } 57 AudioEffectPhaser opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 58 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 59 mixin baseCasts; 60 static AudioEffectPhaser _new() 61 { 62 static godot_class_constructor constructor; 63 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("AudioEffectPhaser"); 64 if(constructor is null) return typeof(this).init; 65 return cast(AudioEffectPhaser)(constructor()); 66 } 67 @disable new(size_t s); 68 /** 69 70 */ 71 void setRangeMinHz(in double hz) 72 { 73 checkClassBinding!(typeof(this))(); 74 ptrcall!(void)(_classBinding.setRangeMinHz, _godot_object, hz); 75 } 76 /** 77 78 */ 79 double getRangeMinHz() const 80 { 81 checkClassBinding!(typeof(this))(); 82 return ptrcall!(double)(_classBinding.getRangeMinHz, _godot_object); 83 } 84 /** 85 86 */ 87 void setRangeMaxHz(in double hz) 88 { 89 checkClassBinding!(typeof(this))(); 90 ptrcall!(void)(_classBinding.setRangeMaxHz, _godot_object, hz); 91 } 92 /** 93 94 */ 95 double getRangeMaxHz() const 96 { 97 checkClassBinding!(typeof(this))(); 98 return ptrcall!(double)(_classBinding.getRangeMaxHz, _godot_object); 99 } 100 /** 101 102 */ 103 void setRateHz(in double hz) 104 { 105 checkClassBinding!(typeof(this))(); 106 ptrcall!(void)(_classBinding.setRateHz, _godot_object, hz); 107 } 108 /** 109 110 */ 111 double getRateHz() const 112 { 113 checkClassBinding!(typeof(this))(); 114 return ptrcall!(double)(_classBinding.getRateHz, _godot_object); 115 } 116 /** 117 118 */ 119 void setFeedback(in double fbk) 120 { 121 checkClassBinding!(typeof(this))(); 122 ptrcall!(void)(_classBinding.setFeedback, _godot_object, fbk); 123 } 124 /** 125 126 */ 127 double getFeedback() const 128 { 129 checkClassBinding!(typeof(this))(); 130 return ptrcall!(double)(_classBinding.getFeedback, _godot_object); 131 } 132 /** 133 134 */ 135 void setDepth(in double depth) 136 { 137 checkClassBinding!(typeof(this))(); 138 ptrcall!(void)(_classBinding.setDepth, _godot_object, depth); 139 } 140 /** 141 142 */ 143 double getDepth() const 144 { 145 checkClassBinding!(typeof(this))(); 146 return ptrcall!(double)(_classBinding.getDepth, _godot_object); 147 } 148 /** 149 Determines the minimum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: `440hz`. 150 */ 151 @property double rangeMinHz() 152 { 153 return getRangeMinHz(); 154 } 155 /// ditto 156 @property void rangeMinHz(double v) 157 { 158 setRangeMinHz(v); 159 } 160 /** 161 Determines the maximum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: `1600hz`. 162 */ 163 @property double rangeMaxHz() 164 { 165 return getRangeMaxHz(); 166 } 167 /// ditto 168 @property void rangeMaxHz(double v) 169 { 170 setRangeMaxHz(v); 171 } 172 /** 173 Adjusts the rate at which the effect sweeps up and down across the frequency range. 174 */ 175 @property double rateHz() 176 { 177 return getRateHz(); 178 } 179 /// ditto 180 @property void rateHz(double v) 181 { 182 setRateHz(v); 183 } 184 /** 185 Output percent of modified sound. Value can range from 0.1 to 0.9. Default value: `0.7`. 186 */ 187 @property double feedback() 188 { 189 return getFeedback(); 190 } 191 /// ditto 192 @property void feedback(double v) 193 { 194 setFeedback(v); 195 } 196 /** 197 Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4. Default value: `1`. 198 */ 199 @property double depth() 200 { 201 return getDepth(); 202 } 203 /// ditto 204 @property void depth(double v) 205 { 206 setDepth(v); 207 } 208 }