98 m_decayHfRatio(0.83f),
99 m_reflectionsGain(0.05f),
100 m_reflectionsDelay(0.007f),
101 m_lateReverbGain(1.26f),
102 m_lateReverbDelay(0.011f),
103 m_airAbsorptionGainHf(0.994f),
104 m_roomRolloffFactor(0.0f),
105 m_decayHfLimit(true) {
112 value = std::min(value, 1.0f);
113 value = std::max(value, 0.0f);
123 value = std::min(value, 1.0f);
124 value = std::max(value, 0.0f);
134 value = std::min(value, 1.0f);
135 value = std::max(value, 0.0f);
145 value = std::min(value, 1.0f);
146 value = std::max(value, 0.0f);
156 value = std::min(value, 20.0f);
157 value = std::max(value, 0.1f);
167 value = std::min(value, 2.0f);
168 value = std::max(value, 0.1f);
178 value = std::min(value, 3.16f);
179 value = std::max(value, 0.0f);
189 value = std::min(value, 0.3f);
190 value = std::max(value, 0.0f);
200 value = std::min(value, 10.0f);
201 value = std::max(value, 0.0f);
211 value = std::min(value, 0.1f);
212 value = std::max(value, 0.0f);
222 value = std::min(value, 1.0f);
223 value = std::max(value, 0.892f);
233 value = std::min(value, 10.0f);
234 value = std::max(value, 0.0f);
254 m_waveformTriangle(true),
278 value = std::min(value, 180);
279 value = std::max(value, -180);
289 value = std::min(value, 10.0f);
290 value = std::max(value, 0.0f);
300 value = std::min(value, 1.0f);
301 value = std::max(value, 0.0f);
311 value = std::min(value, 1.0f);
312 value = std::max(value, -1.0f);
322 value = std::min(value, 0.016f);
323 value = std::max(value, 0.0f);
336 m_lowpassCutoff(8000.0f),
338 m_eqBandwidth(3600.0f) {
344 value = std::min(value, 1.0f);
345 value = std::max(value, 0.0f);
355 value = std::min(value, 1.0f);
356 value = std::max(value, 0.01f);
366 value = std::min(value, 24000.0f);
367 value = std::max(value, 80.0f);
377 value = std::min(value, 24000.0f);
378 value = std::max(value, 80.0f);
388 value = std::min(value, 24000.0f);
389 value = std::max(value, 80.0f);
410 value = std::min(value, 0.207f);
411 value = std::max(value, 0.0f);
421 value = std::min(value, 0.404f);
422 value = std::max(value, 0.0f);
432 value = std::min(value, 0.99f);
433 value = std::max(value, 0.0f);
443 value = std::min(value, 1.0f);
444 value = std::max(value, 0.0f);
454 value = std::min(value, 1.0f);
455 value = std::max(value, -1.0f);
466 m_waveformTriangle(true),
490 value = std::min(value, 180);
491 value = std::max(value, -180);
501 value = std::min(value, 10.0f);
502 value = std::max(value, 0.0f);
512 value = std::min(value, 1.0f);
513 value = std::max(value, 0.0f);
523 value = std::min(value, 1.0f);
524 value = std::max(value, -1.0f);
534 value = std::min(value, 0.004f);
535 value = std::max(value, 0.0f);
548 m_rightDirection(0) {
554 value = std::min(value, 24000.0f);
555 value = std::max(value, 0.0f);
565 value = std::min(value,
uint8_t(2));
566 value = std::max(value,
uint8_t(0));
576 value = std::min(value,
uint8_t(2));
577 value = std::max(value,
uint8_t(0));
599 value = std::min(value,
uint16_t(29));
600 value = std::max(value,
uint16_t(0));
610 value = std::min(value,
uint16_t(29));
611 value = std::max(value,
uint16_t(0));
621 value = std::min(value, int16_t(24));
622 value = std::max(value, int16_t(-24));
632 value = std::min(value, int16_t(24));
633 value = std::max(value, int16_t(-24));
643 value = std::min(value,
uint8_t(2));
644 value = std::max(value,
uint8_t(0));
654 value = std::min(value, 10.0f);
655 value = std::max(value, 0.0f);
673 value = std::min(value, int16_t(12));
674 value = std::max(value, int16_t(-12));
684 value = std::min(value, int16_t(50));
685 value = std::max(value, int16_t(-50));
697 m_highpassCutoff(800.0f),
704 value = std::min(value, 8000.0f);
705 value = std::max(value, 0.0f);
715 value = std::min(value, 24000.0f);
716 value = std::max(value, 0.0f);
726 value = std::min(value,
uint8_t(2));
727 value = std::max(value,
uint8_t(0));
739 m_releaseTime(0.06f),
740 m_resonance(1000.0f),
747 value = std::min(value, 1.0f);
748 value = std::max(value, 0.0001f);
758 value = std::min(value, 1.0f);
759 value = std::max(value, 0.0001f);
769 value = std::min(value, 1000.0f);
770 value = std::max(value, 2.0f);
780 value = std::min(value, 31621.0f);
781 value = std::max(value, 0.00003f);
811 m_mid1Center(500.0f),
814 m_mid2Center(3000.0f),
817 m_highCutoff(6000.0f) {
823 value = std::min(value, 7.943f);
824 value = std::max(value, 0.126f);
834 value = std::min(value, 800.0f);
835 value = std::max(value, 50.0f);
845 value = std::min(value, 7.943f);
846 value = std::max(value, 0.126f);
856 value = std::min(value, 3000.0f);
857 value = std::max(value, 200.0f);
867 value = std::min(value, 1.0f);
868 value = std::max(value, 0.01f);
878 value = std::min(value, 7.943f);
879 value = std::max(value, 0.126f);
889 value = std::min(value, 8000.0f);
890 value = std::max(value, 1000.0f);
900 value = std::min(value, 1.0f);
901 value = std::max(value, 0.01f);
911 value = std::min(value, 7.943f);
912 value = std::max(value, 0.126f);
922 value = std::min(value, 16000.0f);
923 value = std::max(value, 4000.0f);
940 m_decayHfRatio(0.83f),
941 m_decayLfRatio(1.0f),
942 m_reflectionsGain(0.05f),
943 m_reflectionsDelay(0.007f),
945 m_lateReverbGain(1.26f),
946 m_lateReverbDelay(0.011f),
950 m_modulationTime(0.25f),
951 m_modulationDepth(0.0f),
952 m_airAbsorptionGainHf(0.994f),
953 m_hfReference(5000.0f),
954 m_lfReference(250.0f),
955 m_roomRolloffFactor(0.0f),
956 m_decayHfLimit(true) {
963 value = std::min(value, 1.0f);
964 value = std::max(value, 0.0f);
974 value = std::min(value, 1.0f);
975 value = std::max(value, 0.0f);
985 value = std::min(value, 1.0f);
986 value = std::max(value, 0.0f);
996 value = std::min(value, 1.0f);
997 value = std::max(value, 0.0f);
1007 value = std::min(value, 1.0f);
1008 value = std::max(value, 0.0f);
1018 value = std::min(value, 20.0f);
1019 value = std::max(value, 0.1f);
1029 value = std::min(value, 2.0f);
1030 value = std::max(value, 0.1f);
1040 value = std::min(value, 2.0f);
1041 value = std::max(value, 0.1f);
1051 value = std::min(value, 3.16f);
1052 value = std::max(value, 0.0f);
1062 value = std::min(value, 0.3f);
1063 value = std::max(value, 0.0f);
1090 value = std::min(value, 10.0f);
1091 value = std::max(value, 0.0f);
1101 value = std::min(value, 0.1f);
1102 value = std::max(value, 0.0f);
1129 value = std::min(value, 0.25f);
1130 value = std::max(value, 0.075f);
1140 value = std::min(value, 1.0f);
1141 value = std::max(value, 0.0f);
1151 value = std::min(value, 4.0f);
1152 value = std::max(value, 0.04f);
1162 value = std::min(value, 1.0f);
1163 value = std::max(value, 0.0f);
1173 value = std::min(value, 1.0f);
1174 value = std::max(value, 0.892f);
1184 value = std::min(value, 20000.0f);
1185 value = std::max(value, 1000.0f);
1195 value = std::min(value, 1000.0f);
1196 value = std::max(value, 20.0f);
1206 value = std::min(value, 10.0f);
1207 value = std::max(value, 0.0f);
float getAirAbsorptionGainHf() const
Return air absorption gain hf.
float getRoomRolloffFactor() const
Return room rolloff factor.
float getDelay() const
Return delay.
void setAirAbsorptionGainHf(float value)
Sets air absorption gain hf, the distance-dependent attenuation at high frequencies caused by the pro...
void setDensity(float value)
Sets density, controls the coloration of the late reverb.
void setPhonemeCoarseA(int16_t value)
Sets phoneme coarse A, used to adjust the pitch of phoneme filters A and B in 1-semitone increments...
void setEnabled(bool enabled)
Enables or disables the effect.
void setEchoTime(float value)
Sets echo time, the rate at which the cyclic echo repeats itself along the reverberation decay...
void setWaveform(uint8_t value)
Sets waveform used as the carrier signal.
float getGainLf() const
Return lf gain.
void setRate(float value)
Sets rate, the frequency of the low-frequency oscillator used to morph between the two phoneme filter...
void setLrDelay(float value)
Sets the delay between the first ‘tap’ and the second ‘tap’.
VocalMorpher()
Constructor.
float getHfReference() const
Return hf reference.
void setFeedback(float value)
Sets feedback, the amount of feedback the output signal fed back into the input.
float getLateReverbDelay() const
Return late reverb delay.
float getDamping() const
Return damping.
float getDiffusion() const
Return diffusion value.
void setWaveformTriangle(bool value)
Sets the waveform to triangle or sinus.
void setFeedback(float value)
Sets feedback, the amount of the output signal level fed back into the effect’s input.
float getMid2Center() const
Return mid2 center frequency.
uint8_t getWaveform() const
float getReflectionsDelay() const
Return reflections delay.
uint16_t getPhonemeB() const
Return phoneme B.
void setLowCutoff(float value)
Sets low cutoff, the low frequency below which signal will be cut off.
float getDensity() const
Return density value.
float getMid2Gain() const
Return mid1 gain.
ALuint m_slot
Effect slot id;.
float getEchoTime() const
Return the echo time.
void setDecayHfRatio(float value)
Sets decay hf ratio, the spectral quality of the Decay Time parameter.
float getLfReference() const
Return lf reference.
float getRate() const
Return rate.
float getAttackTime() const
Return attack time.
float getReflectionsGain() const
Return reflections gain.
float m_airAbsorptionGainHf
float getDepth() const
Return the depth.
float getRate() const
Return rate.
float getGainHf() const
Return hf gain.
void setGain(float value)
Sets gain, is the master volume control for the reflected sound.
void setWaveform(uint8_t value)
Sets waveform, the shape of the low-frequency oscillator used to morph between the two phoneme filter...
float getEdge() const
Return edge.
SoundEffectType m_effectType
Sound effect type.
SoundFilter * getFilter()
Return sound filter or NULL.
AudioSpaceCoordinate m_reflectionsPan
void setEqBandwidth(float value)
Sets EQ bandwidth, the bandwidth of the post-distortion attenuation.
void setHighGain(float value)
Sets high gain, cut / boost signal on the “high” range.
float getMid1Gain() const
Return mid1 gain.
void setEdge(float value)
Sets edge, the shape of the distortion.
The class defines filters.
float m_roomRolloffFactor
void setDecayHfLimit(bool value)
If decay hf limit is enabled, the high-frequency decay time automatically stays below a limit value t...
void setEchoDepth(float value)
Sets echo depth, the cyclic echo in the reverberation decay, which will be noticeable with transient ...
float getPeakGain() const
Return peak gain.
float getFrequency() const
Return carrier frequency.
float getFeedback() const
Return feedback.
float getGain() const
Return gain value.
static Logger _log(LM_AUDIO)
int16_t getPhonemeCoarseA() const
Return phoneme coarse A.
int16_t getCoarseTune() const
Return coarse tune.
void setReflectionsDelay(float value)
Sets the reflections delay, the amount of delay between the arrival time of the direct path from the ...
float getLowpassCutoff() const
Return lowpass cutoff.
int16_t getPhonemeCoarseB() const
Return phoneme coarse B.
void setLateReverbDelay(float value)
Sets late reverb delay, the begin time of the late reverberation relative to the time of the initial ...
void setModulationDepth(float value)
Sets modulation depth, the amount of pitch change.
void setLateReverbGain(float value)
Sets late reverb gain, the overall amount of later reverberation relative to gain.
float getDecayTime() const
Return decay time.
void setReflectionsGain(float value)
Sets reflections gain, the overall amount of initial reflections relative to the Gain property...
void setCoarseTune(int16_t value)
Sets coarse tune, the number of semitones by which the pitch is shifted.
ALuint getEffectId() const
Return the OpenAL effect handle.
void setLowGain(float value)
Sets low gain, the amount of cut or boost on the low frequency range.
bool isDecayHfLimit() const
Return if decay hf limit is enabled.
void setPhonemeB(uint16_t value)
Sets phoneme B.
int16_t getFineTune() const
Return fine tune.
float getReflectionsGain() const
Return reflections gain.
float getDelay() const
Return delay.
void setLeftDirection(uint8_t value)
Sets left direction, selects which internal signals are added together to produce the output...
bool isWaveformTriangle() const
Return if wavefrom is triangle.
float getDecayLfRatio() const
Return decay lf ratio.
float getDiffusion() const
Return diffusion value.
float m_airAbsorptionGainHf
float getDelay() const
Return delay.
float getFeedback() const
Return feedback.
ALuint getSlotId()
Return the OpenAL auxiliary slot handle.
float getDensity() const
Return density value.
void setEqCenter(float value)
Sets EQ center, the frequency at which the post-distortion attenuation (Distortion Gain) is active...
void setPhonemeA(uint16_t value)
Sets phoneme A.
float getReleaseTime() const
Return release time.
SoundEffectType getEffectType() const
Return sound effect type.
uint8_t getRightDirection() const
Return left direction.
float getLateReverbGain() const
Return late reverb gain.
void setDensity(float value)
Sets density, controls the coloration of the late reverb.
void setDecayTime(float value)
The reverberation decay time.
bool m_enabled
Effect enabled.
void setPeakGain(float value)
Sets peak gain, the input signal level at which the band-pass filter will be fully opened...
LPALGENEFFECTS alGenEffects
float getHighGain() const
Return high gain.
float getMid1Width() const
Return mid1 width.
bool isWaveformTriangle() const
Return if waveform is triangle or sinus.
float getGain() const
Return gain value.
float getEqCenter() const
Return EQ center.
uint16_t getPhonemeA() const
Return phoneme A.
AudioSpaceCoordinate getLateReverbPan() const
Return late reverb pan.
void setDecayHfLimit(bool value)
If decay hf limit is enabled, the high-frequency decay time automatically stays below a limit value t...
void setRightDirection(uint8_t value)
Sets right direction, selects which internal signals are added together to produce the output...
void setMid2Width(float value)
Sets mid2 width, the width of the “mid2” range.
void setGain(float value)
Sets gain, to attenuate the distorted sound.
float getFrequency() const
Return carrier frequency.
void setRoomRolloffFactor(float value)
Sets room rolloff factor, similar to rolloff factor it attenuate the reflected sound (containing both...
RingModulator()
Constructor.
void setDiffusion(float value)
Sets diffusion, controls the echo density in the reverberation decay.
float getMid2Width() const
Return mid2 width.
void setDepth(float value)
Sets depth, the ratio by which the delay time is modulated by the LFO.
void setFilter(SoundFilter *filter)
Sets the additional sound filter.
void setDelay(float value)
Sets the delay between the original sound and the first ‘tap’, or echo instance.
void setLowpassCutoff(float value)
Sets lowpass cutoff, to limit the amount of high frequency signal feeding into the distortion effect...
void setDecayHfRatio(float value)
Sets decay hf ratio, the spectral quality of the Decay Time parameter.
void setAttackTime(float value)
Sets attack time, the time the filtering effect takes to sweep from minimum to maximum center frequen...
void setReflectionsGain(float value)
Sets reflections gain, the overall amount of initial reflections relative to the Gain property...
float getGain() const
Return gain.
void setFeedback(float value)
Sets the feedback, the amount of processed signal that is fed back to the input of the chorus effect...
void setResonance(float value)
Sets resonance, the peak, some times known as emphasis or Q, of the auto-wah band-pass filter...
SoundFilter * m_filter
Additional filter effect.
void setDiffusion(float value)
Sets diffusion, controls the echo density in the reverberation decay.
SoundEffect()
Constructor.
void setAirAbsorptionGainHf(float value)
Sets air absorption gain hf, the distance-dependent attenuation at high frequencies caused by the pro...
void setRate(float value)
Sets the rate, the modulation rate of the LFO that controls the delay time of the delayed signals...
float getLowGain() const
Return low gain.
void setFrequency(float value)
Sets the carrier signal frequency.
float getRate() const
Return the rate.
float getMid1Center() const
Return mid1 center frequency.
LPALDELETEEFFECTS alDeleteEffects
void setSpread(float value)
Sets spread, that defines how hard panned the individual echoes are.
void setDecayTime(float value)
The reverberation decay time.
float getLateReverbGain() const
Return late reverb gain.
void setDepth(float value)
Sets the depth, the amount by which the delay time is modulated by the LFO.
void setLateReverbDelay(float value)
Sets late reverb delay, the begin time of the late reverberation relative to the time of the initial ...
void setFineTune(int16_t value)
Sets fine tune, the number of cents between Semitones a pitch is shifted.
void setHfReference(float value)
Sets hf reference, determine respectively the frequencies at which the high-frequency effects created...
void setLateReverbGain(float value)
Sets late reverb gain, the overall amount of later reverberation relative to gain.
void setDelay(float value)
Sets delay, the average amount of time the sample is delayed before it is played back.
AudioSpaceCoordinate getReflectionsPan() const
Return reflections pan.
void setReflectionsPan(const AudioSpaceCoordinate &coordinate)
Sets reflections pan, the 3D vector that controls the spatial distribution of the cluster of early re...
void setGainHf(float value)
Sets gain hf, tweaks reflected sound by attenuating it at high frequencies.
ALuint m_effect
Effect object id.
void setRoomRolloffFactor(float value)
Sets room rolloff factor, similar to rolloff factor it attenuate the reflected sound (containing both...
float getDecayTime() const
Return decay time.
float m_roomRolloffFactor
void setGainLf(float value)
Sets gain lf, tweaks reflected sound by attenuating it at low frequencies.
void setRate(float value)
Sets rate, the number of times per second the LFO controlling the amount of delay repeats...
bool isCompressor() const
Return true if compressor is on, false otherwise.
void setPhonemeCoarseB(int16_t value)
Sets phoneme coarse B, used to adjust the pitch of phoneme filters A and B in 1-semitone increments...
SoundEffectType
Sound effect type.
float getAirAbsorptionGainHf() const
Return air absorption gain hf.
int32_t getPhase() const
Return phase.
float getModulationDepth() const
Return modulation depth.
void setMid1Center(float value)
Sets mid1 center, the center frequency for the “mid1” range.
float getHighpassCutoff() const
Return highpass cutoff frequency.
float getHighCutoff() const
Return high cutoff frequency.
float getDecayHfRatio() const
Return decay hf ratio.
AudioSpaceCoordinate m_lateReverbPan
float getDecayHfRatio() const
Return decay hf ratio.
void setGain(float value)
Sets gain, is the master volume control for the reflected sound.
void setHighCutoff(float value)
Sets high cutoff, the high frequency above which signal will be cut off.
float getLowCutoff() const
Return low cutoff.
void setModulationTime(float value)
Sets modulation time, the speed of the vibrato (rate of periodic changes in pitch).
float getResonance() const
Return resonance.
void setPhase(int32_t value)
Sets the phase, difference between the left and right LFO’s.
void setReleaseTime(float value)
Sets relase time, the time the filtering effect takes to sweep from maximum back to base center frequ...
bool isEnabled() const
Return true if the effect is enabled, false otherwise.
bool isDecayHfLimit() const
Return if decay hf limit is enabled.
void setLateReverbPan(const AudioSpaceCoordinate &coordinate)
Sets late reverb pan, the 3D vector that controls the spatial distribution of the late reverb...
void setHighpassCutoff(float value)
Sets highpass cutoff at which the input signal is high-pass filtered before being ring modulated...
void setMid2Center(float value)
Sets mid2 center, the center frequency for the “mid2” range.
float getEqBandwidth() const
Return EQ bandwidth.
void setSlotId(ALuint slot)
Sets the OpenAL auxiliary slot handle.
float getLrDelay() const
Return LR delay.
uint8_t getLeftDirection() const
Return left direction.
float getFeedback() const
Return feedback.
int32_t getPhase() const
Return the phase.
void setWaveformTriangle(bool value)
Sets waveform to triangle or sinus.
FrequencyShifter()
Constructor.
void setGainHf(float value)
Sets gain hf, tweaks reflected sound by attenuating it at high frequencies.
float getReflectionsDelay() const
Return reflections delay.
void setFrequency(float value)
Sets the carrier frequency.
float getEchoDepth() const
Return echo depth.
void setCompressor(bool value)
Sets compressor on or off.
void loadPreset(const EFXEAXREVERBPROPERTIES &prop)
Load presets into the EAX reverb.
void setPhase(int32_t value)
Sets phase, difference between the left and right LFO’s.
void setMid2Gain(float value)
Sets mid2 gain, cut / boost signal on the “mid2” range.
void setLfReference(float value)
Sets lf reference, determine respectively the frequencies at which the low-frequency effects created ...
float getSpread() const
Return spread.
float getLateReverbDelay() const
Return late reverb delay.
void setDamping(float value)
Sets damping, the amount of high frequency damping applied to each echo.
void setMid1Width(float value)
Sets mid1 width, the width of the “mid1” range.
float getGainHf() const
Return hf gain.
void setDecayLfRatio(float value)
Sets decay lf ratio, the spectral quality of the Decay Time parameter.
PitchShifter()
Constructor.
float getModulationTime() const
Return modulation time.
float getRoomRolloffFactor() const
Return room rolloff factor.
float getDepth() const
Return depth.
void setMid1Gain(float value)
Sets mid1 gain, cut / boost signal on the “mid1” range.
void setReflectionsDelay(float value)
Sets the reflections delay, the amount of delay between the arrival time of the direct path from the ...
void setDelay(float value)
Sets the delay, the average amount of time the sample is delayed before it is played back...
uint8_t getWaveform() const
Return waveform.
virtual ~SoundEffect()
Destructor.