java.lang.Object
javafx.scene.media.EqualizerBand
The
EqualizerBand
class provides control for each band in the
AudioEqualizer
.- Since:
- JavaFX 2.0
- See Also:
-
Property Summary
TypePropertyDescriptionBandwidth of the band in Hertz.Center frequency of the band in Hertz.The gain to be applied to the frequencies of this band. -
Field Summary
-
Constructor Summary
ConstructorDescriptionEqualizerBand
default constructor.EqualizerBand
(double centerFrequency, double bandwidth, double gain) CustomEqualizerBand
constructor. -
Method Summary
Modifier and TypeMethodDescriptionBandwidth of the band in Hertz.Center frequency of the band in Hertz.The gain to be applied to the frequencies of this band.final double
Retrieve the bandwidth of the band.final double
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.
-
Property Details
-
centerFrequency
Center frequency of the band in Hertz. The default value is0.0
Hz.- See Also:
-
bandwidth
Bandwidth of the band in Hertz. The default value is0.0
Hz.- See Also:
-
gain
The gain to be applied to the frequencies of this band. The default value is0.0
dB.- See Also:
-
-
Field Details
-
MIN_GAIN
public static final double MIN_GAINMinimum possible gain value. In the current implementation this value is-24.0
dB.- See Also:
-
MAX_GAIN
public static final double MAX_GAINMaximum possible gain value. In the current implementation this value is12.0
dB.- See Also:
-
-
Constructor Details
-
EqualizerBand
public EqualizerBand()EqualizerBand
default constructor. It creates an instance withcenterFrequency
,bandwidth
andgain
set to 0. -
EqualizerBand
public EqualizerBand(double centerFrequency, double bandwidth, double gain) CustomEqualizerBand
constructor. It creates an instance from thecenterFrequency
,bandwidth
andgain
parameters. Thegain
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).
-
-
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
Center frequency of the band in Hertz. The default value is0.0
Hz.- Returns:
- the
centerFrequency
property - See Also:
-
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
Bandwidth of the band in Hertz. The default value is0.0
Hz.- Returns:
- the
bandwidth
property - See Also:
-
setGain
public final void setGain(double value) -
getGain
public final double getGain()Retrieve the gain to be applied to the band.- Returns:
- the gain of the band in dB.
-
gainProperty
The gain to be applied to the frequencies of this band. The default value is0.0
dB.- Returns:
- the
gain
property - See Also:
-