Player::setVoiceFx
Sets an effect on a voice stream.
Syntax
player.setVoiceFx(fxType, priority);
Required Arguments
- fxType: int One of the following types of effect (see BASSFXType)
- priority: int The priority of the new FX, which determines it's position in the DSP chain - DSP/FX with higher priority are applied before those with lower. This parameter has no effect with DX8 effects when the "with FX flag" DX8 effect implementation is used.
BASSFXType
const BASSFXType = { BASS_FX_DX8_CHORUS: 0, BASS_FX_DX8_COMPRESSOR: 1, BASS_FX_DX8_DISTORTION: 2, BASS_FX_DX8_ECHO: 3, BASS_FX_DX8_FLANGER: 4, BASS_FX_DX8_GARGLE: 5, BASS_FX_DX8_I3DL2REVERB: 6, BASS_FX_DX8_PARAMEQ: 7, BASS_FX_DX8_REVERB: 8, BASS_FX_VOLUME: 9, // bass_fx.dll BASS_FX_BFX_PEAKEQ: 65540, BASS_FX_BFX_BQF: 65555 };
Example
Client-Side
// Simple walkie talkie (radio) effect const bassBfxBqfLowpass = 0; const bassBfxBqfHighpass = 1; const bassBfxChannelAll = -1; const bfqHandle = player.setVoiceFx(BASSFXType.BASS_FX_BFX_BQF, 0); const peakEqHandle = player.setVoiceFx(BASSFXType.BASS_FX_BFX_PEAKEQ, 0); player.setVoiceFxBQF(bfqHandle, { lFilter: bassBfxBqfHighpass, fCenter: 900.0, fGain: 0.0, fBandwidth: 0.86, fQ: 0.0, fS: 0.0, lChannel: bassBfxChannelAll }); player.setVoiceFxBQF(bfqHandle, { lFilter: bassBfxBqfLowpass, fCenter: 1400.0, fGain: 0.0, fBandwidth: 0.83, fQ: 0.0, fS: 0.0, lChannel: bassBfxChannelAll }); player.setVoiceFxPeakEq(peakEqHandle, { lBand: 0, fBandwidth: 13.0, fQ: 1070.0, fCenter: 0.0, fGain: 0.3, lChannel: bassBfxChannelAll }); player.setVoiceFxPeakEq(peakEqHandle, { lBand: 1, fBandwidth: 13.0, fQ: 1300.0, fCenter: 0.0, fGain: 0.4, lChannel: bassBfxChannelAll });
See also
Player::removeVoiceFx
Player::resetVoiceFx
Player::setVoiceFxChorus
Player::setVoiceFxCompressor
Player::setVoiceFxDistortion
Player::setVoiceFxEcho
Player::setVoiceFxFlanger
Player::setVoiceFxGargle
Player::setVoiceFxI3DL2Reverb
Player::setVoiceFxParamEq
Player::setVoiceFxReverb
Player::setVoiceFxVolume
Player::setVoiceFxPeakEq
Player::setVoiceFxBQF