public class SpectralDifference extends FeatureExtractor<java.lang.Float,float[]>
Modifier and Type | Class and Description |
---|---|
static class |
SpectralDifference.DifferenceType |
featureDescriptions, features, name, numFeatures
Constructor and Description |
---|
SpectralDifference(float samplerate)
Create a spectral difference feature extractor of the entire spectrum.
|
SpectralDifference(float samplerate,
float minf,
float maxf)
Create a spectral difference feature extractor with a specific frequency
window.
|
Modifier and Type | Method and Description |
---|---|
void |
process(TimeStamp startTime,
TimeStamp endTime,
float[] spectrum)
Process some data of type P (specified by the class def).
|
void |
setDifferenceType(SpectralDifference.DifferenceType dt) |
void |
setFreqWindow(float minf,
float maxf)
Specify a window of the spectrum to analyse.
|
addListener, forward, getFeatureDescriptions, getFeatures, getName, getNumberOfFeatures, removeListener, setName, setNumberOfFeatures
getKillListener, isDeleted, isPaused, kill, message, messageReceived, pause, setKillListener, start, toString
public SpectralDifference(float samplerate)
samplerate
- The sample rate of the AudioContextpublic SpectralDifference(float samplerate, float minf, float maxf)
samplerate
- The sample rate of the AudioContextminf
- The lower frequency of the windowmaxf
- The upper frequency of the windowpublic void setFreqWindow(float minf, float maxf)
minf
- The lower frequencymaxf
- The upper frequencypublic void setDifferenceType(SpectralDifference.DifferenceType dt)
public void process(TimeStamp startTime, TimeStamp endTime, float[] spectrum)
FeatureExtractor
process
in class FeatureExtractor<java.lang.Float,float[]>
spectrum
- the data.