FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
FIFE::Chorus Class Reference

The chorus effect essentially replays the input audio accompanied by another slightly delayed version of the signal, creating a ‘doubling’ effect. More...

#include <soundeffect.h>

+ Inheritance diagram for FIFE::Chorus:
+ Collaboration diagram for FIFE::Chorus:

Public Member Functions

 Chorus ()
 Constructor. More...
 
void setWaveformTriangle (bool value)
 Sets the waveform to triangle or sinus. More...
 
bool isWaveformTriangle () const
 Return if wavefrom is triangle. More...
 
void setPhase (int32_t value)
 Sets the phase, difference between the left and right LFO’s. More...
 
int32_t getPhase () const
 Return the phase. More...
 
void setRate (float value)
 Sets the rate, the modulation rate of the LFO that controls the delay time of the delayed signals. More...
 
float getRate () const
 Return the rate. More...
 
void setDepth (float value)
 Sets the depth, the amount by which the delay time is modulated by the LFO. More...
 
float getDepth () const
 Return the depth. More...
 
void setFeedback (float value)
 Sets the feedback, the amount of processed signal that is fed back to the input of the chorus effect. More...
 
float getFeedback () const
 Return feedback. More...
 
void setDelay (float value)
 Sets the delay, the average amount of time the sample is delayed before it is played back. More...
 
float getDelay () const
 Return delay. 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

bool m_waveformTriangle
 
int32_t m_phase
 
float m_rate
 
float m_depth
 
float m_feedback
 
float m_delay
 

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 chorus effect essentially replays the input audio accompanied by another slightly delayed version of the signal, creating a ‘doubling’ effect.

Definition at line 256 of file soundeffect.h.

Constructor & Destructor Documentation

◆ Chorus()

FIFE::Chorus::Chorus ( )

Member Function Documentation

◆ getDelay()

float FIFE::Chorus::getDelay ( ) const

Return delay.

Definition at line 328 of file soundeffect.cpp.

References m_delay.

◆ getDepth()

float FIFE::Chorus::getDepth ( ) const

Return the depth.

Definition at line 306 of file soundeffect.cpp.

References m_depth.

◆ getFeedback()

float FIFE::Chorus::getFeedback ( ) const

Return feedback.

Definition at line 317 of file soundeffect.cpp.

References m_feedback.

◆ getPhase()

int32_t FIFE::Chorus::getPhase ( ) const

Return the phase.

Definition at line 284 of file soundeffect.cpp.

References m_phase.

◆ getRate()

float FIFE::Chorus::getRate ( ) const

Return the rate.

Definition at line 295 of file soundeffect.cpp.

References m_rate.

◆ isWaveformTriangle()

bool FIFE::Chorus::isWaveformTriangle ( ) const

Return if wavefrom is triangle.

Definition at line 273 of file soundeffect.cpp.

References m_waveformTriangle.

◆ setDelay()

void FIFE::Chorus::setDelay ( float  value)

Sets the delay, the average amount of time the sample is delayed before it is played back.

Parameters
valueRange 0.0 to 0.016, default 0.016.

Definition at line 321 of file soundeffect.cpp.

References FIFE::alEffectf, m_delay, and FIFE::SoundEffect::m_effect.

◆ setDepth()

void FIFE::Chorus::setDepth ( float  value)

Sets the depth, the amount by which the delay time is modulated by the LFO.

Parameters
valueRange 0.0 to 1.0, default 0.1.

Definition at line 299 of file soundeffect.cpp.

References FIFE::alEffectf, m_depth, and FIFE::SoundEffect::m_effect.

◆ setFeedback()

void FIFE::Chorus::setFeedback ( float  value)

Sets the feedback, the amount of processed signal that is fed back to the input of the chorus effect.

Parameters
valueRange -1.0 to 1.0, default 0.25.

Definition at line 310 of file soundeffect.cpp.

References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_feedback.

◆ setPhase()

void FIFE::Chorus::setPhase ( int32_t  value)

Sets the phase, difference between the left and right LFO’s.

Parameters
valueRange -180 to 180, default 90.

Definition at line 277 of file soundeffect.cpp.

References FIFE::alEffecti, FIFE::SoundEffect::m_effect, and m_phase.

◆ setRate()

void FIFE::Chorus::setRate ( float  value)

Sets the rate, the modulation rate of the LFO that controls the delay time of the delayed signals.

Parameters
valueRange 0.0 to 10.0, default 1.1.

Definition at line 288 of file soundeffect.cpp.

References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_rate.

◆ setWaveformTriangle()

void FIFE::Chorus::setWaveformTriangle ( bool  value)

Sets the waveform to triangle or sinus.

Controls delay time of delayed signals.

Parameters
valueTrue for triangle, false for sinus. Default is true.

Definition at line 264 of file soundeffect.cpp.

References FIFE::alEffecti, FIFE::SoundEffect::m_effect, and m_waveformTriangle.

Member Data Documentation

◆ m_delay

float FIFE::Chorus::m_delay
private

Definition at line 325 of file soundeffect.h.

Referenced by getDelay(), and setDelay().

◆ m_depth

float FIFE::Chorus::m_depth
private

Definition at line 323 of file soundeffect.h.

Referenced by getDepth(), and setDepth().

◆ m_feedback

float FIFE::Chorus::m_feedback
private

Definition at line 324 of file soundeffect.h.

Referenced by getFeedback(), and setFeedback().

◆ m_phase

int32_t FIFE::Chorus::m_phase
private

Definition at line 321 of file soundeffect.h.

Referenced by getPhase(), and setPhase().

◆ m_rate

float FIFE::Chorus::m_rate
private

Definition at line 322 of file soundeffect.h.

Referenced by getRate(), and setRate().

◆ m_waveformTriangle

bool FIFE::Chorus::m_waveformTriangle
private

Definition at line 320 of file soundeffect.h.

Referenced by isWaveformTriangle(), and setWaveformTriangle().


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