Package noiseBandMonitor
Class BandData
java.lang.Object
noiseBandMonitor.BandData
Class to create a set of octave or third octave bands
using base-two exact steps according to the standard
ANSI S1.11-2004.
Each band had a mid frequency, a band number and a name.
- Author:
- Doug Gillespie
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
calcFreq
(int bandNumber) double[]
static double
getBandHalfWidth
(BandType bandType) double[]
double[]
String[]
int[]
static int
getHighBandNumber
(double frequency) Get the lowest band number which has a centre frequency above the given frequency in Hz.static int
getLowBandNumber
(double frequency) Get the highest band number which has a centre frequency below the given frequency in Hz.
-
Method Details
-
calcFreq
public static double calcFreq(int bandNumber) -
getLowBandNumber
public static int getLowBandNumber(double frequency) Get the highest band number which has a centre frequency below the given frequency in Hz.- Parameters:
frequency
- Frequency in Hz- Returns:
- Band number (30 = 1000 Hz).
-
getHighBandNumber
public static int getHighBandNumber(double frequency) Get the lowest band number which has a centre frequency above the given frequency in Hz.- Parameters:
frequency
- Frequency in Hz- Returns:
- Band number (30 = 1000 Hz).
-
getBandHalfWidth
-
getBandNumbers
public int[] getBandNumbers()- Returns:
- the bandNumbers
-
getBandCentres
public double[] getBandCentres()- Returns:
- the bandCentres
-
getBandHiEdges
public double[] getBandHiEdges()- Returns:
- the bandHiEdges
-
getBandLoEdges
public double[] getBandLoEdges()- Returns:
- the bandLoEdges
-
getBandNames
- Returns:
- the bandNames
-