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, setName
getKillListener, isDeleted, isPaused, kill, message, messageReceived, pause, setKillListener, start, toString
public SpectralCentroid(float sampleRate)
sampleRate
- the sample rate in samples per second.public void process(TimeStamp startTime, TimeStamp endTime, float[] powerSpectrum)
FeatureExtractor
process
in class FeatureExtractor<java.lang.Float,float[]>
powerSpectrum
- the data.public int getNumberOfFeatures()
FeatureExtractor
getNumberOfFeatures
in class FeatureExtractor<java.lang.Float,float[]>
public void setNumberOfFeatures(int numFeatures)
FeatureExtractor
setNumberOfFeatures
in class FeatureExtractor<java.lang.Float,float[]>
numFeatures
- the new number of features.