FIFE
be64c707dea6b3250bd4355bf5c825d25920087d
|
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>
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... | |
SoundFilter * | getFilter () |
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... | |
SoundFilter * | m_filter |
Additional filter effect. More... | |
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.
FIFE::RingModulator::RingModulator | ( | ) |
Constructor.
Definition at line 695 of file soundeffect.cpp.
References FIFE::alEffecti, FIFE::SoundEffect::m_effect, FIFE::SoundEffect::m_effectType, and FIFE::SE_EFFECT_RING_MODULATOR.
float FIFE::RingModulator::getFrequency | ( | ) | const |
float FIFE::RingModulator::getHighpassCutoff | ( | ) | const |
Return highpass cutoff frequency.
Definition at line 721 of file soundeffect.cpp.
References m_highpassCutoff.
uint8_t FIFE::RingModulator::getWaveform | ( | ) | const |
Definition at line 732 of file soundeffect.cpp.
References m_waveform.
void FIFE::RingModulator::setFrequency | ( | float | value | ) |
Sets the carrier signal frequency.
value | Range 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.
void FIFE::RingModulator::setHighpassCutoff | ( | float | value | ) |
Sets highpass cutoff at which the input signal is high-pass filtered before being ring modulated.
value | Range 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.
void FIFE::RingModulator::setWaveform | ( | uint8_t | value | ) |
Sets waveform used as the carrier signal.
value | Range 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.
|
private |
Definition at line 724 of file soundeffect.h.
Referenced by getFrequency(), and setFrequency().
|
private |
Definition at line 725 of file soundeffect.h.
Referenced by getHighpassCutoff(), and setHighpassCutoff().
|
private |
Definition at line 726 of file soundeffect.h.
Referenced by getWaveform(), and setWaveform().