public class ConstantQ extends java.lang.Object implements AudioProcessor
Judith C. Brown, Calculation of a constant Q spectral transform, J. Acoust. Soc. Am., 89(1): 425-434, 1991.
Judith C. Brown and Miller S. Puckette, An efficient algorithm for the calculation of a constant Q transform, J. Acoust. Soc. Am., Vol. 92, No. 5, November 1992
Benjamin Blankertz, The Constant Q Transform
Constructor and Description |
---|
ConstantQ(float sampleRate,
float minFreq,
float maxFreq,
float binsPerOctave) |
ConstantQ(float sampleRate,
float minFreq,
float maxFreq,
float binsPerOctave,
float threshold,
float spread) |
Modifier and Type | Method and Description |
---|---|
void |
calculate(float[] inputBuffer)
Take an input buffer with audio and calculate the constant Q
coefficients.
|
void |
calculateMagintudes(float[] inputBuffer)
Take an input buffer with audio and calculate the constant Q magnitudes.
|
int |
getBinsPerOctave() |
float[] |
getCoefficients()
Return the Constant Q coefficients calculated for the previous audio
buffer.
|
int |
getFFTlength() |
float[] |
getFreqencies() |
float[] |
getMagnitudes()
Returns the Constant Q magnitudes calculated for the previous audio
buffer.
|
int |
getNumberOfOutputBands() |
boolean |
process(AudioEvent audioEvent)
Process the audio event.
|
void |
processingFinished()
Notify the AudioProcessor that no more data is available and processing
has finished.
|
public ConstantQ(float sampleRate, float minFreq, float maxFreq, float binsPerOctave)
public ConstantQ(float sampleRate, float minFreq, float maxFreq, float binsPerOctave, float threshold, float spread)
public void calculate(float[] inputBuffer)
inputBuffer
- The input buffer with audio.public void calculateMagintudes(float[] inputBuffer)
inputBuffer
- The input buffer with audio.public boolean process(AudioEvent audioEvent)
AudioProcessor
process
in interface AudioProcessor
audioEvent
- The audio event that contains audio data.public void processingFinished()
AudioProcessor
processingFinished
in interface AudioProcessor
public float[] getFreqencies()
public float[] getMagnitudes()
public float[] getCoefficients()
public int getNumberOfOutputBands()
public int getFFTlength()
public int getBinsPerOctave()