|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcomirva.audio.util.CentSpectrum
public class CentSpectrum
| Field Summary | |
|---|---|
protected double |
baseFreq
|
protected int |
blockWidth
|
protected int |
centHop
|
protected int |
centStart
|
protected int |
hopSize
|
protected int |
linearFilters
|
protected FFT |
magnitudeFFT
|
protected int |
normalizationWidth
|
protected float |
sampleRate
|
protected int |
windowSize
|
| Constructor Summary | |
|---|---|
CentSpectrum(float sampleRate)
Creates a Sone object with default window size of 256 for the given sample rate. |
|
CentSpectrum(int windowSize,
int hopSize,
float sampleRate,
int centStart,
int centHop,
int linearFilters,
int normalizationWidth)
Creates a Sone object with given window size and sample rate. |
|
| Method Summary | |
|---|---|
int |
getHopSize()
Returns the number of samples skipped between two windows. |
int[] |
getUpperBoundsCent()
|
int |
getWindowSize()
Returns the number of samples skipped between two windows. |
(package private) float |
hz2cent(float hz)
|
(package private) double[][] |
normalize(double[][] centSpectrum,
int normalizationWidth)
|
Vector<double[]> |
process(AudioPreProcessor in)
Performs the transformation of the input data to Sone. |
double[][] |
process(double[] input)
Performs the transformation of the input data to Sone. |
double[] |
processWindow(double[] window,
int start)
Transforms one window of samples to Sone. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int windowSize
protected int hopSize
protected float sampleRate
protected double baseFreq
protected FFT magnitudeFFT
protected int centStart
protected int centHop
protected int normalizationWidth
protected int blockWidth
protected int linearFilters
| Constructor Detail |
|---|
public CentSpectrum(float sampleRate)
throws IllegalArgumentException
sampleRate - float samples per second, must be greater than zero; none integer
values get rounded
IllegalArgumentException - raised if method contract is violated
public CentSpectrum(int windowSize,
int hopSize,
float sampleRate,
int centStart,
int centHop,
int linearFilters,
int normalizationWidth)
throws IllegalArgumentException
windowSize - int size of a windowsampleRate - float samples per second, must be greater than zero; not
whole-numbered values get rounded
IllegalArgumentException - raised if method contract is violated| Method Detail |
|---|
public int[] getUpperBoundsCent()
public int getHopSize()
public int getWindowSize()
public Vector<double[]> process(AudioPreProcessor in)
throws IllegalArgumentException,
IOException
in - AudioPreProcessor input data is a complete Audio stream, must
have the same sample rate like this sone object,
must not be a null value
IOException - if there are any problems regarding the inputstream
IllegalArgumentException - raised if mehtod contract is violated
public double[][] process(double[] input)
throws IllegalArgumentException,
IOException
input - double[] input data is an array of samples, must be a multiple
of the hop size, must not be a null value
IOException - if there are any problems regarding the inputstream
IllegalArgumentException - raised if mehtod contract is violated
public double[] processWindow(double[] window,
int start)
throws IllegalArgumentException
window - double[] data to be converted, must contain enough data for
one windowstart - int start index of the window data
IllegalArgumentException - raised if mehtod contract is violated
double[][] normalize(double[][] centSpectrum,
int normalizationWidth)
float hz2cent(float hz)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||