FIFE
be64c707dea6b3250bd4355bf5c825d25920087d
|
The distortion effect simulates turning up (overdriving) the gain stage on a guitar amplifier or adding a distortion pedal to an instrument’s output. More...
#include <soundeffect.h>
Public Member Functions | |
Distortion () | |
Constructor. More... | |
void | setEdge (float value) |
Sets edge, the shape of the distortion. More... | |
float | getEdge () const |
Return edge. More... | |
void | setGain (float value) |
Sets gain, to attenuate the distorted sound. More... | |
float | getGain () const |
Return gain. More... | |
void | setLowpassCutoff (float value) |
Sets lowpass cutoff, to limit the amount of high frequency signal feeding into the distortion effect. More... | |
float | getLowpassCutoff () const |
Return lowpass cutoff. More... | |
void | setEqCenter (float value) |
Sets EQ center, the frequency at which the post-distortion attenuation (Distortion Gain) is active. More... | |
float | getEqCenter () const |
Return EQ center. More... | |
void | setEqBandwidth (float value) |
Sets EQ bandwidth, the bandwidth of the post-distortion attenuation. More... | |
float | getEqBandwidth () const |
Return EQ bandwidth. More... | |
Public Member Functions inherited from FIFE::SoundEffect | |
SoundEffect () | |
Constructor. More... | |
virtual | ~SoundEffect () |
Destructor. More... | |
ALuint | getEffectId () const |
Return the OpenAL effect handle. More... | |
void | setSlotId (ALuint slot) |
Sets the OpenAL auxiliary slot handle. More... | |
ALuint | getSlotId () |
Return the OpenAL auxiliary slot handle. More... | |
SoundEffectType | getEffectType () const |
Return sound effect type. More... | |
void | setEnabled (bool enabled) |
Enables or disables the effect. More... | |
bool | isEnabled () const |
Return true if the effect is enabled, false otherwise. More... | |
void | setFilter (SoundFilter *filter) |
Sets the additional sound filter. More... | |
SoundFilter * | getFilter () |
Return sound filter or NULL. More... | |
Private Attributes | |
float | m_edge |
float | m_gain |
float | m_lowpassCutoff |
float | m_eqCenter |
float | m_eqBandwidth |
Additional Inherited Members | |
Protected Attributes inherited from FIFE::SoundEffect | |
ALuint | m_effect |
Effect object id. More... | |
ALuint | m_slot |
Effect slot id;. More... | |
SoundEffectType | m_effectType |
Sound effect type. More... | |
bool | m_enabled |
Effect enabled. More... | |
SoundFilter * | m_filter |
Additional filter effect. More... | |
The distortion effect simulates turning up (overdriving) the gain stage on a guitar amplifier or adding a distortion pedal to an instrument’s output.
Definition at line 331 of file soundeffect.h.
FIFE::Distortion::Distortion | ( | ) |
Constructor.
Definition at line 333 of file soundeffect.cpp.
References FIFE::alEffecti, FIFE::SoundEffect::m_effect, FIFE::SoundEffect::m_effectType, and FIFE::SE_EFFECT_DISTORTION.
float FIFE::Distortion::getEdge | ( | ) | const |
float FIFE::Distortion::getEqBandwidth | ( | ) | const |
float FIFE::Distortion::getEqCenter | ( | ) | const |
float FIFE::Distortion::getGain | ( | ) | const |
float FIFE::Distortion::getLowpassCutoff | ( | ) | const |
void FIFE::Distortion::setEdge | ( | float | value | ) |
Sets edge, the shape of the distortion.
value | Range 0.0 to 1.0, default 0.2. |
Definition at line 343 of file soundeffect.cpp.
References FIFE::alEffectf, m_edge, and FIFE::SoundEffect::m_effect.
void FIFE::Distortion::setEqBandwidth | ( | float | value | ) |
Sets EQ bandwidth, the bandwidth of the post-distortion attenuation.
value | Range 80.0 to 24000.0, default 3600.0. |
Definition at line 387 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_eqBandwidth.
void FIFE::Distortion::setEqCenter | ( | float | value | ) |
Sets EQ center, the frequency at which the post-distortion attenuation (Distortion Gain) is active.
value | Range 80.0 to 24000.0, default 3600.0. |
Definition at line 376 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_eqCenter.
void FIFE::Distortion::setGain | ( | float | value | ) |
Sets gain, to attenuate the distorted sound.
value | Range 0.01 to 1.0, default 0.05. |
Definition at line 354 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_gain.
void FIFE::Distortion::setLowpassCutoff | ( | float | value | ) |
Sets lowpass cutoff, to limit the amount of high frequency signal feeding into the distortion effect.
value | Range 80.0 to 24000.0, default 8000.0. |
Definition at line 365 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_lowpassCutoff.
|
private |
Definition at line 385 of file soundeffect.h.
|
private |
Definition at line 389 of file soundeffect.h.
Referenced by getEqBandwidth(), and setEqBandwidth().
|
private |
Definition at line 388 of file soundeffect.h.
Referenced by getEqCenter(), and setEqCenter().
|
private |
Definition at line 386 of file soundeffect.h.
|
private |
Definition at line 387 of file soundeffect.h.
Referenced by getLowpassCutoff(), and setLowpassCutoff().