BASS.NET API for the Un4seen BASS Audio Library

BASS_DX8_PARAMEQ Class

BASS.NET API for the Un4seen BASS Audio Library
Used with BASS_FXGetParameters(Int32, IntPtr) and BASS_FXSetParameters(Int32, IntPtr) to retrieve and set the parameters of a parametric equalizer effect.
Inheritance Hierarchy

SystemObject
  Un4seen.BassBASS_DX8_PARAMEQ

Namespace:  Un4seen.Bass
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

[SerializableAttribute]
[StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public sealed class BASS_DX8_PARAMEQ

The BASS_DX8_PARAMEQ type exposes the following members.

Constructors

  NameDescription
Public methodBASS_DX8_PARAMEQ
Default constructor.
Public methodBASS_DX8_PARAMEQ(Single, Single, Single)
constructor already setting the members
Top
Methods

  NameDescription
Public methodPreset_Default
Sets the instance members to a preset.
Public methodPreset_High
Sets the instance members to a preset.
Public methodPreset_Low
Sets the instance members to a preset.
Public methodPreset_Mid
Sets the instance members to a preset.
Top
Fields

  NameDescription
Public fieldfBandwidth
Bandwidth, in semitones, in the range from 1 to 36. Default 18 semitones.
Public fieldfCenter
Center frequency, in hertz, in the range from 80 to 16000. This value cannot exceed one-third of the frequency of the channel. Default 100 Hz.
Public fieldfGain
Gain, in the range from -15 to 15. Default 0 dB.
Top
Remarks

Platform-specific

On Windows, fCenter must be in the range of 80 to 16000, and not exceed one-third of the channel's sample rate. On other platforms, the range is above 0 Hz and below half the channel's sample rate.

Examples

Setting up a 3-band EQ:
private int[] _fxEQ = {0, 0, 0};
...
// 3-band EQ
BASS_DX8_PARAMEQ eq = new BASS_DX8_PARAMEQ();
_fxEQ[0] = Bass.BASS_ChannelSetFX(_stream, BASSFXType.BASS_FX_DX8_PARAMEQ, 0);
_fxEQ[1] = Bass.BASS_ChannelSetFX(_stream, BASSFXType.BASS_FX_DX8_PARAMEQ, 0);
_fxEQ[2] = Bass.BASS_ChannelSetFX(_stream, BASSFXType.BASS_FX_DX8_PARAMEQ, 0);
eq.fBandwidth = 18f;
eq.fCenter = 100f;
eq.fGain = 0f;
Bass.BASS_FXSetParameters(_fxEQ[0], eq);
eq.fCenter = 1000f;
Bass.BASS_FXSetParameters(_fxEQ[1], eq);
eq.fCenter = 8000f;
Bass.BASS_FXSetParameters(_fxEQ[2], eq);
...
private void UpdateEQ(int band, float gain)
{
  BASS_DX8_PARAMEQ eq = new BASS_DX8_PARAMEQ();
  if (Bass.BASS_FXGetParameters(_fxEQ[band], eq))
  {
    eq.fGain = gain;
    Bass.BASS_FXSetParameters(_fxEQ[band], eq);
  }
}
See Also

Reference