public class Spectrogram
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
SPECTROGRAM_DEFAULT_FFT_SAMPLE_SIZE |
static int |
SPECTROGRAM_DEFAULT_OVERLAP_FACTOR |
Constructor and Description |
---|
Spectrogram(Wave wave)
Constructor
|
Spectrogram(Wave wave,
int fftSampleSize,
int overlapFactor)
Constructor
|
Modifier and Type | Method and Description |
---|---|
double[][] |
getAbsoluteSpectrogramData()
Get spectrogram: spectrogram[time][frequency]=intensity
|
int |
getFftSampleSize() |
int |
getFramesPerSecond() |
double[][] |
getNormalizedSpectrogramData()
Get spectrogram: spectrogram[time][frequency]=intensity
|
int |
getNumFrames() |
int |
getNumFrequencyUnit() |
int |
getOverlapFactor() |
double |
getUnitFrequency() |
public static final int SPECTROGRAM_DEFAULT_FFT_SAMPLE_SIZE
public static final int SPECTROGRAM_DEFAULT_OVERLAP_FACTOR
public Spectrogram(Wave wave)
wave
- public Spectrogram(Wave wave, int fftSampleSize, int overlapFactor)
wave
- fftSampleSize
- number of sample in fft, the value needed to be a number to power of 2overlapFactor
- 1/overlapFactor overlapping, e.g. 1/4=25% overlapping, 0 for no overlappingpublic double[][] getNormalizedSpectrogramData()
public double[][] getAbsoluteSpectrogramData()
public int getNumFrames()
public int getFramesPerSecond()
public int getNumFrequencyUnit()
public double getUnitFrequency()
public int getFftSampleSize()
public int getOverlapFactor()