public class SpectralCentroid extends FeatureExtractor<java.lang.Float,float[]>
PowerSpectrum object.featureDescriptions, features, name, numFeatures| Constructor and Description |
|---|
SpectralCentroid(float sampleRate)
Instantiates a new SpectralCentroid.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getNumberOfFeatures()
Gets the number of features.
|
void |
process(TimeStamp startTime,
TimeStamp endTime,
float[] powerSpectrum)
Process some data of type P (specified by the class def).
|
void |
setNumberOfFeatures(int numFeatures)
Sets the number of features.
|
addListener, forward, getFeatureDescriptions, getFeatures, getName, removeListener, setNamegetKillListener, isDeleted, isPaused, kill, message, messageReceived, pause, setKillListener, start, toStringpublic SpectralCentroid(float sampleRate)
sampleRate - the sample rate in samples per second.public void process(TimeStamp startTime, TimeStamp endTime, float[] powerSpectrum)
FeatureExtractorprocess in class FeatureExtractor<java.lang.Float,float[]>powerSpectrum - the data.public int getNumberOfFeatures()
FeatureExtractorgetNumberOfFeatures in class FeatureExtractor<java.lang.Float,float[]>public void setNumberOfFeatures(int numFeatures)
FeatureExtractorsetNumberOfFeatures in class FeatureExtractor<java.lang.Float,float[]>numFeatures - the new number of features.