public final class EqualizerBand extends Object
EqualizerBand
class provides control for each band in the
AudioEqualizer
.AudioEqualizer
Type | Property and 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.
|
Modifier and Type | Field and Description |
---|---|
static double |
MAX_GAIN
Maximum possible gain value.
|
static double |
MIN_GAIN
Minimum possible gain value.
|
Constructor and Description |
---|
EqualizerBand()
EqualizerBand default constructor. |
EqualizerBand(double centerFrequency,
double bandwidth,
double gain)
Custom
EqualizerBand constructor. |
Modifier and Type | Method and 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.
|
double |
getBandwidth()
Retrieve the bandwidth of the band.
|
double |
getCenterFrequency()
Retrieve the center frequency of the band.
|
double |
getGain()
Retrieve the gain to be applied to the band.
|
void |
setBandwidth(double value)
Set the bandwidth of the band in Hertz.
|
void |
setCenterFrequency(double value)
Set the center frequency on the band in Hertz.
|
void |
setGain(double value)
Set the gain of the band in dB.
|
public DoubleProperty centerFrequencyProperty
0.0
Hz.getCenterFrequency()
,
setCenterFrequency(double)
public DoubleProperty bandwidthProperty
0.0
Hz.getBandwidth()
,
setBandwidth(double)
public DoubleProperty gainProperty
0.0
dB.getGain()
,
setGain(double)
public static final double MIN_GAIN
-24.0
dB.public static final double MAX_GAIN
12.0
dB.public EqualizerBand()
EqualizerBand
default constructor. It creates an instance with
centerFrequency
, bandwidth
and gain
set to 0.public EqualizerBand(double centerFrequency, double bandwidth, double gain)
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).public final void setCenterFrequency(double value)
value
- the center frequency which must be a positive value in Hz.public final double getCenterFrequency()
public DoubleProperty centerFrequencyProperty()
0.0
Hz.getCenterFrequency()
,
setCenterFrequency(double)
public final void setBandwidth(double value)
value
- the bandwidth which must be a positive value in Hz.public final double getBandwidth()
public DoubleProperty bandwidthProperty()
0.0
Hz.getBandwidth()
,
setBandwidth(double)
public final void setGain(double value)
public final double getGain()
public DoubleProperty gainProperty()
0.0
dB.getGain()
,
setGain(double)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.