# Class EqualizerBand

java.lang.Object
javafx.scene.media.EqualizerBand

public final class EqualizerBand extends Object
The `EqualizerBand` class provides control for each band in the `AudioEqualizer`.

Since:
  JavaFX 2.0
See Also:
  - `AudioEqualizer`

- ## Property Summary

  Properties
  Type
  Property
  Description
  `DoubleProperty`
  `bandwidth`
  Bandwidth of the band in Hertz.
  `DoubleProperty`
  `centerFrequency`
  Center frequency of the band in Hertz.
  `DoubleProperty`
  `gain`
  The gain to be applied to the frequencies of this band.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final double`
  `MAX_GAIN`
  Maximum possible gain value.
  `static final double`
  `MIN_GAIN`
  Minimum possible gain value.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EqualizerBand()`
  `EqualizerBand` default constructor.
  `EqualizerBand(double centerFrequency, double bandwidth, double gain)`
  Custom `EqualizerBand` constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DoubleProperty`
  `bandwidthProperty()`
  Bandwidth of the band in Hertz.
  `DoubleProperty`
  `centerFrequencyProperty()`
  Center frequency of the band in Hertz.
  `DoubleProperty`
  `gainProperty()`
  The gain to be applied to the frequencies of this band.
  `final double`
  `getBandwidth()`
  Retrieve the bandwidth of the band.
  `final double`
  `getCenterFrequency()`
  Retrieve the center frequency of the band.
  `final double`
  `getGain()`
  Retrieve the gain to be applied to the band.
  `final void`
  `setBandwidth(double value)`
  Set the bandwidth of the band in Hertz.
  `final void`
  `setCenterFrequency(double value)`
  Set the center frequency on the band in Hertz.
  `final void`
  `setGain(double value)`
  Set the gain of the band in dB.

  ### Methods declared in class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Property Details

  - ### centerFrequency

    public DoubleProperty centerFrequencyProperty
    Center frequency of the band in Hertz. The default value is `0.0` Hz.
    See Also:
      - `getCenterFrequency()`
      - `setCenterFrequency(double)`
      - `centerFrequencyProperty()`

  - ### bandwidth

    public DoubleProperty bandwidthProperty
    Bandwidth of the band in Hertz. The default value is `0.0` Hz.
    See Also:
      - `getBandwidth()`
      - `setBandwidth(double)`
      - `bandwidthProperty()`

  - ### gain

    public DoubleProperty gainProperty
    The gain to be applied to the frequencies of this band. The default value is `0.0` dB.
    See Also:
      - `getGain()`
      - `setGain(double)`
      - `gainProperty()`

- ## Field Details

  - ### MIN_GAIN

    public static final double MIN_GAIN
    Minimum possible gain value. In the current implementation this value is `-24.0` dB.
    See Also:
      - Constant Field Values

  - ### MAX_GAIN

    public static final double MAX_GAIN
    Maximum possible gain value. In the current implementation this value is `12.0` dB.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### EqualizerBand

    public EqualizerBand()
    `EqualizerBand` default constructor. It creates an instance with `centerFrequency`, `bandwidth` and `gain` set to 0.

  - ### EqualizerBand

    public EqualizerBand(double centerFrequency, double bandwidth, double gain)
    Custom `EqualizerBand` constructor. It creates an instance from the `centerFrequency`, `bandwidth` and `gain` parameters. The `gain` specifies the amount of amplification (`gain > 0.0` dB) or attenuation (`gain < 0.0` dB) to be applied to the center frequency of the band. The bandwidth is the frequency spread between the upper and lower edges of the equalizer transfer function which have half the dB gain of the peak (center frequency).
    Parameters:
      `centerFrequency` - a positive value specifying the center frequency of the band in Hertz.
      `bandwidth` - a positive value specifying the bandwidth of the band in Hertz.
      `gain` - the gain in decibels to be applied to the band in the range [`MIN_GAIN`, `MAX_GAIN`] dB.

- ## Method Details

  - ### setCenterFrequency

    public final void setCenterFrequency(double value)
    Set the center frequency on the band in Hertz.
    Parameters:
      `value` - the center frequency which must be a positive value in Hz.

  - ### getCenterFrequency

    public final double getCenterFrequency()
    Retrieve the center frequency of the band.
    Returns:
      the center frequency on the band in Hertz.

  - ### centerFrequencyProperty

    public DoubleProperty centerFrequencyProperty()
    Center frequency of the band in Hertz. The default value is `0.0` Hz.
    Returns:
      the `centerFrequency` property
    See Also:
      - `getCenterFrequency()`
      - `setCenterFrequency(double)`

  - ### setBandwidth

    public final void setBandwidth(double value)
    Set the bandwidth of the band in Hertz.
    Parameters:
      `value` - the bandwidth which must be a positive value in Hz.

  - ### getBandwidth

    public final double getBandwidth()
    Retrieve the bandwidth of the band.
    Returns:
      the bandwidth of the band in Hertz.

  - ### bandwidthProperty

    public DoubleProperty bandwidthProperty()
    Bandwidth of the band in Hertz. The default value is `0.0` Hz.
    Returns:
      the `bandwidth` property
    See Also:
      - `getBandwidth()`
      - `setBandwidth(double)`

  - ### setGain

    public final void setGain(double value)
    Set the gain of the band in dB. Gain property is limited to be within the interval `MIN_GAIN` to `MAX_GAIN`.
    Parameters:
      `value` - the gain in the range [`MIN_GAIN`, `MAX_GAIN`].

  - ### getGain

    public final double getGain()
    Retrieve the gain to be applied to the band.
    Returns:
      the gain of the band in dB.

  - ### gainProperty

    public DoubleProperty gainProperty()
    The gain to be applied to the frequencies of this band. The default value is `0.0` dB.
    Returns:
      the `gain` property
    See Also:
      - `getGain()`
      - `setGain(double)`