FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
FIFE::RingModulator Class Reference

The ring modulator multiplies an input signal by a carrier signal in the time domain, resulting in tremolo or inharmonic effects. More...

#include <soundeffect.h>

+ Inheritance diagram for FIFE::RingModulator:
+ Collaboration diagram for FIFE::RingModulator:

Public Member Functions

 RingModulator ()
 Constructor. More...
 
void setFrequency (float value)
 Sets the carrier signal frequency. More...
 
float getFrequency () const
 Return carrier frequency. More...
 
void setHighpassCutoff (float value)
 Sets highpass cutoff at which the input signal is high-pass filtered before being ring modulated. More...
 
float getHighpassCutoff () const
 Return highpass cutoff frequency. More...
 
void setWaveform (uint8_t value)
 Sets waveform used as the carrier signal. More...
 
uint8_t getWaveform () const
 
- 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_frequency
 
float m_highpassCutoff
 
uint8_t m_waveform
 

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 ring modulator multiplies an input signal by a carrier signal in the time domain, resulting in tremolo or inharmonic effects.

Definition at line 692 of file soundeffect.h.

Constructor & Destructor Documentation

◆ RingModulator()

FIFE::RingModulator::RingModulator ( )

Member Function Documentation

◆ getFrequency()

float FIFE::RingModulator::getFrequency ( ) const

Return carrier frequency.

Definition at line 710 of file soundeffect.cpp.

References m_frequency.

◆ getHighpassCutoff()

float FIFE::RingModulator::getHighpassCutoff ( ) const

Return highpass cutoff frequency.

Definition at line 721 of file soundeffect.cpp.

References m_highpassCutoff.

◆ getWaveform()

uint8_t FIFE::RingModulator::getWaveform ( ) const

Definition at line 732 of file soundeffect.cpp.

References m_waveform.

◆ setFrequency()

void FIFE::RingModulator::setFrequency ( float  value)

Sets the carrier signal frequency.

Parameters
valueRange 0.0 to 8000.0, default 440.0.

Definition at line 703 of file soundeffect.cpp.

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

◆ setHighpassCutoff()

void FIFE::RingModulator::setHighpassCutoff ( float  value)

Sets highpass cutoff at which the input signal is high-pass filtered before being ring modulated.

Parameters
valueRange 0.0 to 24000.0, default 800.0.

Definition at line 714 of file soundeffect.cpp.

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

◆ setWaveform()

void FIFE::RingModulator::setWaveform ( uint8_t  value)

Sets waveform used as the carrier signal.

Parameters
valueRange 0 to 2, default 0. 0=sin, 1=saw, 2=square.

Definition at line 725 of file soundeffect.cpp.

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

Member Data Documentation

◆ m_frequency

float FIFE::RingModulator::m_frequency
private

Definition at line 724 of file soundeffect.h.

Referenced by getFrequency(), and setFrequency().

◆ m_highpassCutoff

float FIFE::RingModulator::m_highpassCutoff
private

Definition at line 725 of file soundeffect.h.

Referenced by getHighpassCutoff(), and setHighpassCutoff().

◆ m_waveform

uint8_t FIFE::RingModulator::m_waveform
private

Definition at line 726 of file soundeffect.h.

Referenced by getWaveform(), and setWaveform().


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