FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::Distortion Class Reference

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>

+ Inheritance diagram for FIFE::Distortion:
+ Collaboration diagram for FIFE::Distortion:

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...
 
SoundFiltergetFilter ()
 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...
 
SoundFilterm_filter
 Additional filter effect. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

FIFE::Distortion::Distortion ( )

Member Function Documentation

float FIFE::Distortion::getEdge ( ) const

Return edge.

Definition at line 350 of file soundeffect.cpp.

References m_edge.

float FIFE::Distortion::getEqBandwidth ( ) const

Return EQ bandwidth.

Definition at line 394 of file soundeffect.cpp.

References m_eqBandwidth.

float FIFE::Distortion::getEqCenter ( ) const

Return EQ center.

Definition at line 383 of file soundeffect.cpp.

References m_eqCenter.

float FIFE::Distortion::getGain ( ) const

Return gain.

Definition at line 361 of file soundeffect.cpp.

References m_gain.

float FIFE::Distortion::getLowpassCutoff ( ) const

Return lowpass cutoff.

Definition at line 372 of file soundeffect.cpp.

References m_lowpassCutoff.

void FIFE::Distortion::setEdge ( float  value)

Sets edge, the shape of the distortion.

Parameters
valueRange 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.

Parameters
valueRange 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.

Parameters
valueRange 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.

Parameters
valueRange 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.

Parameters
valueRange 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.

Member Data Documentation

float FIFE::Distortion::m_edge
private

Definition at line 385 of file soundeffect.h.

Referenced by getEdge(), and setEdge().

float FIFE::Distortion::m_eqBandwidth
private

Definition at line 389 of file soundeffect.h.

Referenced by getEqBandwidth(), and setEqBandwidth().

float FIFE::Distortion::m_eqCenter
private

Definition at line 388 of file soundeffect.h.

Referenced by getEqCenter(), and setEqCenter().

float FIFE::Distortion::m_gain
private

Definition at line 386 of file soundeffect.h.

Referenced by getGain(), and setGain().

float FIFE::Distortion::m_lowpassCutoff
private

Definition at line 387 of file soundeffect.h.

Referenced by getLowpassCutoff(), and setLowpassCutoff().


The documentation for this class was generated from the following files: