public class Spectrum
extends java.lang.Object
frequency = binIndex * sampleRate / sizeNote that the upper half of the spectrum is above the Nyquist frequency. Those frequencies are mirrored around the Nyquist frequency. Note that this spectral API is experimental and may change at any time.
SpectralFFT
,
SpectralIFFT
,
SpectralProcessor
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_SIZE |
static int |
DEFAULT_SIZE_LOG_2 |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
copyTo(Spectrum destination)
Copy this spectrum to another spectrum of the same length.
|
double[] |
getImaginary() |
double[] |
getReal() |
void |
setSize(int size)
If you change the size of the spectrum then the real and imaginary arrays will be
reallocated.
|
int |
size() |
public static final int DEFAULT_SIZE_LOG_2
public static final int DEFAULT_SIZE
public double[] getReal()
public double[] getImaginary()
public void setSize(int size)
size
- public int size()
public void copyTo(Spectrum destination)
destination
- public void clear()