Player::setVoiceFx: Difference between revisions
(See also block and correct category) |
(fix lib name) |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
Sets an effect on a voice stream. | |||
==Syntax== | ==Syntax== | ||
<pre> | <pre> | ||
| Line 4: | Line 6: | ||
</pre> | </pre> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''fxType:''' One of the following types of effect (see BASSFXType) | *'''fxType:''' {{RageType|int}} One of the following types of effect (see BASSFXType) | ||
*'''priority:''' 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. | *'''priority:''' {{RageType|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== | ==BASSFXType== | ||
| Line 21: | Line 23: | ||
BASS_FX_VOLUME: 9, | BASS_FX_VOLUME: 9, | ||
// | // bass_fx.dll | ||
BASS_FX_BFX_PEAKEQ: 65540, | BASS_FX_BFX_PEAKEQ: 65540, | ||
BASS_FX_BFX_BQF: 65555 | BASS_FX_BFX_BQF: 65555 | ||
}; | }; | ||
</pre> | </pre> | ||
==Example== | |||
{{ClientsideCode| | |||
<pre> | |||
// 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 | |||
}); | |||
</pre> | |||
}} | |||
==See also== | ==See also== | ||
[[Player::setVoiceFxChorus]] | [[Player::removeVoiceFx]]<br> | ||
[[Player::resetVoiceFx]]<br> | |||
[[Player::setVoiceFxChorus]]<br> | |||
[[Player::setVoiceFxCompressor]]<br> | |||
[[Player::setVoiceFxDistortion]]<br> | |||
[[Player::setVoiceFxEcho]]<br> | |||
[[Player::setVoiceFxFlanger]]<br> | |||
[[Player::setVoiceFxGargle]]<br> | |||
[[Player::setVoiceFxI3DL2Reverb]]<br> | |||
[[Player::setVoiceFxParamEq]]<br> | |||
[[Player::setVoiceFxReverb]]<br> | |||
[[Player::setVoiceFxVolume]]<br> | |||
[[Player::setVoiceFxPeakEq]]<br> | |||
[[Player::setVoiceFxBQF]]<br> | |||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
Latest revision as of 19:48, 17 October 2022
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