Player::setVoiceFxBQF: Difference between revisions

From RAGE Multiplayer Wiki
(BASSFXPhase)
No edit summary
 
(4 intermediate revisions by one other user not shown)
Line 13: Line 13:
   
   
===Required Arguments===
===Required Arguments===
*'''fxHandle:''' The effect handle.
*'''fxHandle:''' {{RageType|int}} The effect handle.
*'''lFilter:''' Defines which BiQuad filter should be used.
*'''lFilter:''' {{RageType|int}} Defines which BiQuad filter should be used.
*'''fCenter:''' Cut-off frequency (Center in PEAKINGEQ and Shelving filters) in Hz (1...info.freq/2). Default = 200Hz.
*'''fCenter:''' {{RageType|float}} Cut-off frequency (Center in PEAKINGEQ and Shelving filters) in Hz (1...info.freq/2). Default = 200Hz.
*'''fGain:''' Gain in dB (-15...0...+15). Default 0dB (used only for PEAKINGEQ and Shelving filters).
*'''fGain:''' {{RageType|float}} Gain in dB (-15...0...+15). Default 0dB (used only for PEAKINGEQ and Shelving filters).
*'''fBandwidth:''' Bandwidth in octaves (0.1...4...n), Q is not in use (fBandwidth has priority over fQ). Default = 1 (0=not in use). The bandwidth in octaves (between -3 dB frequencies for for BANDPASS and NOTCH or between midpoint (dBgain/2) gain frequencies for PEAKINGEQ).  
*'''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). The bandwidth in octaves (between -3 dB frequencies for for BANDPASS and NOTCH or between midpoint (dBgain/2) gain frequencies for PEAKINGEQ).  
*'''fQ:''' The EE kinda definition (linear), if fBandwidth is not in use (0.1...1). Default = 0.0 (0=not in use).
*'''fQ:''' {{RageType|float}} The EE kinda definition (linear), if fBandwidth is not in use (0.1...1). Default = 0.0 (0=not in use).
*'''fS:''' A shelf slope parameter (linear, used only with Shelving filters) (0.1...1). Default = 0.0. When fS=1, the shelf slope is as steep as you can get it and remain monotonically increasing or decreasing gain with frequency.
*'''fS:''' {{RageType|float}} A shelf slope parameter (linear, used only with Shelving filters) (0.1...1). Default = 0.0. When fS=1, the shelf slope is as steep as you can get it and remain monotonically increasing or decreasing gain with frequency.
*'''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.


==BASSFXPhase==
==Example==
{{ClientsideCode|
<pre>
<pre>
const BASSFXPhase = {
// Simple walkie talkie (radio) effect
     BASS_FX_PHASE_NEG_180: 0, // Phase differential between left and right LFOs (-180)
const bassBfxBqfLowpass = 0;
     BASS_FX_PHASE_NEG_90: 1, // Phase differential between left and right LFOs (-90)
const bassBfxBqfHighpass = 1;
     BASS_FX_PHASE_ZERO: 2, // Phase differential between left and right LFOs (+/-0)
const bassBfxChannelAll = -1;
     BASS_FX_PHASE_90: 3, // Phase differential between left and right LFOs (+90)
 
     BASS_FX_PHASE_180: 4 // Phase differential between left and right LFOs (+180)
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>
</pre>
}}
==See also==
{{VoiceFx_definition_c}}


[[Category:Clientside API]]
[[Category:Clientside API]]

Latest revision as of 08:34, 10 November 2024

Syntax

player.setVoiceFxBQF(fxHandle, {
    lFilter,
    fCenter,
    fGain,
    fBandwidth,
    fQ,
    fS,
    lChannel
});

Required Arguments

  • fxHandle: int The effect handle.
  • lFilter: int Defines which BiQuad filter should be used.
  • fCenter: float Cut-off frequency (Center in PEAKINGEQ and Shelving filters) in Hz (1...info.freq/2). Default = 200Hz.
  • fGain: float Gain in dB (-15...0...+15). Default 0dB (used only for PEAKINGEQ and Shelving filters).
  • 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). The bandwidth in octaves (between -3 dB frequencies for for BANDPASS and NOTCH or between midpoint (dBgain/2) gain frequencies for PEAKINGEQ).
  • fQ: float The EE kinda definition (linear), if fBandwidth is not in use (0.1...1). Default = 0.0 (0=not in use).
  • fS: float A shelf slope parameter (linear, used only with Shelving filters) (0.1...1). Default = 0.0. When fS=1, the shelf slope is as steep as you can get it and remain monotonically increasing or decreasing gain with frequency.
  • 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