Player::setVoiceFxPeakEq: Difference between revisions
(Created page with "==Syntax== <pre> player.setVoiceFxPeakEq(fxHandle, { lBand, fBandwidth, fQ, fCenter, fGain, lChannel }); </pre> ===Required Arguments=== *'''fxHandle...") |
No edit summary |
||
| (3 intermediate revisions by one other user not shown) | |||
| Line 12: | Line 12: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''fxHandle:''' The effect handle. | *'''fxHandle:''' {{RageType|int}} The effect handle. | ||
*'''lBand:''' Number of bands (0...n), more bands means more memory and cpu usage. Default = 0. | *'''lBand:''' {{RageType|int}} Number of bands (0...n), more bands means more memory and cpu usage. Default = 0. | ||
*'''fBandwidth:''' Bandwidth in octaves (0.1...4...n), Q is not in use (fBandwidth has priority over fQ). Default = 1 (0=not in use). In most cases users should use the minimum of 0.5 octave. The bandwidth in octaves (between -3 dB frequencies for BPF and notch or between midpoint (dBgain/2) gain frequencies for peaking EQ). | *'''fBandwidth:''' {{RageType|float}} Bandwidth in octaves (0.1...4...n), Q is not in use (fBandwidth has priority over fQ). Default = 1 (0=not in use). In most cases users should use the minimum of 0.5 octave. The bandwidth in octaves (between -3 dB frequencies for BPF and notch or between midpoint (dBgain/2) gain frequencies for peaking EQ). | ||
*'''fQ:''' EE kinda definition of Q (0.1...1...n), if bandwidth is not in use. Default = 0.0 (0=not in use). | *'''fQ:''' {{RageType|float}} EE kinda definition of Q (0.1...1...n), if bandwidth is not in use. Default = 0.0 (0=not in use). | ||
*'''fCenter:''' Center frequency in Hz (1Hz...nHz). Default = 1000 (max. is 1/2 of the samplerate). | *'''fCenter:''' {{RageType|float}} Center frequency in Hz (1Hz...nHz). Default = 1000 (max. is 1/2 of the samplerate). | ||
*'''fGain:''' Gain in dB (-15...0...+15). Default 0dB. | *'''fGain:''' {{RageType|float}} Gain in dB (-15...0...+15). Default 0dB. | ||
*'''lChannel:''' A BASSFXChan flag to define on which channels to apply the effect. Default: -1 (BASS_BFX_CHANALL) - all channels. | *'''lChannel:''' {{RageType|int}} A BASSFXChan flag to define on which channels to apply the effect. Default: -1 (BASS_BFX_CHANALL) - all channels. | ||
==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== | |||
{{VoiceFx_definition_c}} | |||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
Latest revision as of 08:34, 10 November 2024
Syntax
player.setVoiceFxPeakEq(fxHandle, {
lBand,
fBandwidth,
fQ,
fCenter,
fGain,
lChannel
});
Required Arguments
- fxHandle: int The effect handle.
- lBand: int Number of bands (0...n), more bands means more memory and cpu usage. Default = 0.
- fBandwidth: float Bandwidth in octaves (0.1...4...n), Q is not in use (fBandwidth has priority over fQ). Default = 1 (0=not in use). In most cases users should use the minimum of 0.5 octave. The bandwidth in octaves (between -3 dB frequencies for BPF and notch or between midpoint (dBgain/2) gain frequencies for peaking EQ).
- fQ: float EE kinda definition of Q (0.1...1...n), if bandwidth is not in use. Default = 0.0 (0=not in use).
- fCenter: float Center frequency in Hz (1Hz...nHz). Default = 1000 (max. is 1/2 of the samplerate).
- fGain: float Gain in dB (-15...0...+15). Default 0dB.
- lChannel: int A BASSFXChan flag to define on which channels to apply the effect. Default: -1 (BASS_BFX_CHANALL) - all channels.
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