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.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 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 package(godot) 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 GDNativeClassBinding 43 { 44 __gshared: 45 @GodotName("get_depth") GodotMethod!(double) getDepth; 46 @GodotName("get_feedback") GodotMethod!(double) getFeedback; 47 @GodotName("get_range_max_hz") GodotMethod!(double) getRangeMaxHz; 48 @GodotName("get_range_min_hz") GodotMethod!(double) getRangeMinHz; 49 @GodotName("get_rate_hz") GodotMethod!(double) getRateHz; 50 @GodotName("set_depth") GodotMethod!(void, double) setDepth; 51 @GodotName("set_feedback") GodotMethod!(void, double) setFeedback; 52 @GodotName("set_range_max_hz") GodotMethod!(void, double) setRangeMaxHz; 53 @GodotName("set_range_min_hz") GodotMethod!(void, double) setRangeMinHz; 54 @GodotName("set_rate_hz") GodotMethod!(void, double) setRateHz; 55 } 56 /// 57 pragma(inline, true) bool opEquals(in AudioEffectPhaser other) const 58 { return _godot_object.ptr is other._godot_object.ptr; } 59 /// 60 pragma(inline, true) typeof(null) opAssign(typeof(null) n) 61 { _godot_object.ptr = n; return null; } 62 /// 63 pragma(inline, true) bool opEquals(typeof(null) n) const 64 { return _godot_object.ptr is n; } 65 /// 66 size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; } 67 mixin baseCasts; 68 /// Construct a new instance of AudioEffectPhaser. 69 /// Note: use `memnew!AudioEffectPhaser` instead. 70 static AudioEffectPhaser _new() 71 { 72 static godot_class_constructor constructor; 73 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("AudioEffectPhaser"); 74 if(constructor is null) return typeof(this).init; 75 return cast(AudioEffectPhaser)(constructor()); 76 } 77 @disable new(size_t s); 78 /** 79 80 */ 81 double getDepth() const 82 { 83 checkClassBinding!(typeof(this))(); 84 return ptrcall!(double)(GDNativeClassBinding.getDepth, _godot_object); 85 } 86 /** 87 88 */ 89 double getFeedback() const 90 { 91 checkClassBinding!(typeof(this))(); 92 return ptrcall!(double)(GDNativeClassBinding.getFeedback, _godot_object); 93 } 94 /** 95 96 */ 97 double getRangeMaxHz() const 98 { 99 checkClassBinding!(typeof(this))(); 100 return ptrcall!(double)(GDNativeClassBinding.getRangeMaxHz, _godot_object); 101 } 102 /** 103 104 */ 105 double getRangeMinHz() const 106 { 107 checkClassBinding!(typeof(this))(); 108 return ptrcall!(double)(GDNativeClassBinding.getRangeMinHz, _godot_object); 109 } 110 /** 111 112 */ 113 double getRateHz() const 114 { 115 checkClassBinding!(typeof(this))(); 116 return ptrcall!(double)(GDNativeClassBinding.getRateHz, _godot_object); 117 } 118 /** 119 120 */ 121 void setDepth(in double depth) 122 { 123 checkClassBinding!(typeof(this))(); 124 ptrcall!(void)(GDNativeClassBinding.setDepth, _godot_object, depth); 125 } 126 /** 127 128 */ 129 void setFeedback(in double fbk) 130 { 131 checkClassBinding!(typeof(this))(); 132 ptrcall!(void)(GDNativeClassBinding.setFeedback, _godot_object, fbk); 133 } 134 /** 135 136 */ 137 void setRangeMaxHz(in double hz) 138 { 139 checkClassBinding!(typeof(this))(); 140 ptrcall!(void)(GDNativeClassBinding.setRangeMaxHz, _godot_object, hz); 141 } 142 /** 143 144 */ 145 void setRangeMinHz(in double hz) 146 { 147 checkClassBinding!(typeof(this))(); 148 ptrcall!(void)(GDNativeClassBinding.setRangeMinHz, _godot_object, hz); 149 } 150 /** 151 152 */ 153 void setRateHz(in double hz) 154 { 155 checkClassBinding!(typeof(this))(); 156 ptrcall!(void)(GDNativeClassBinding.setRateHz, _godot_object, hz); 157 } 158 /** 159 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. 160 */ 161 @property double depth() 162 { 163 return getDepth(); 164 } 165 /// ditto 166 @property void depth(double v) 167 { 168 setDepth(v); 169 } 170 /** 171 Output percent of modified sound. Value can range from 0.1 to 0.9. 172 */ 173 @property double feedback() 174 { 175 return getFeedback(); 176 } 177 /// ditto 178 @property void feedback(double v) 179 { 180 setFeedback(v); 181 } 182 /** 183 Determines the maximum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000. 184 */ 185 @property double rangeMaxHz() 186 { 187 return getRangeMaxHz(); 188 } 189 /// ditto 190 @property void rangeMaxHz(double v) 191 { 192 setRangeMaxHz(v); 193 } 194 /** 195 Determines the minimum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000. 196 */ 197 @property double rangeMinHz() 198 { 199 return getRangeMinHz(); 200 } 201 /// ditto 202 @property void rangeMinHz(double v) 203 { 204 setRangeMinHz(v); 205 } 206 /** 207 Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range. 208 */ 209 @property double rateHz() 210 { 211 return getRateHz(); 212 } 213 /// ditto 214 @property void rateHz(double v) 215 { 216 setRateHz(v); 217 } 218 }