net.beadsproject.beads.analysis.featureextractors
Class Frequency

java.lang.Object
  extended by net.beadsproject.beads.core.Bead
      extended by net.beadsproject.beads.analysis.FeatureExtractor<java.lang.Float,float[]>
          extended by net.beadsproject.beads.analysis.featureextractors.Frequency

public class Frequency
extends FeatureExtractor<java.lang.Float,float[]>

Frequency processes spectral data forwarded to it by a PowerSpectrum to determine the best estimate for the frequency of the current signal.


Field Summary
 
Fields inherited from class net.beadsproject.beads.analysis.FeatureExtractor
featureDescriptions, features, name, numFeatures
 
Constructor Summary
Frequency(float sampleRate)
          Instantiates a new Frequency.
 
Method Summary
 java.lang.String[] getFeatureDescriptions()
          Gets the feature descriptions.
 void process(TimeStamp startTime, TimeStamp endTime, float[] powerSpectrum)
          Process some data of type P (specified by the class def).
 
Methods inherited from class net.beadsproject.beads.analysis.FeatureExtractor
addListener, forward, getFeatures, getName, getNumberOfFeatures, removeListener, setName, setNumberOfFeatures
 
Methods inherited from class net.beadsproject.beads.core.Bead
getKillListener, isDeleted, isPaused, kill, message, messageReceived, pause, setKillListener, start, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Frequency

public Frequency(float sampleRate)
Instantiates a new Frequency.

Parameters:
sampleRate - The sample rate of the audio context
Method Detail

process

public void process(TimeStamp startTime,
                    TimeStamp endTime,
                    float[] powerSpectrum)
Description copied from class: FeatureExtractor
Process some data of type P (specified by the class def). This method must be overidden by implementing classes.

Specified by:
process in class FeatureExtractor<java.lang.Float,float[]>
powerSpectrum - the data.

getFeatureDescriptions

public java.lang.String[] getFeatureDescriptions()
Description copied from class: FeatureExtractor
Gets the feature descriptions. Implementing classes should make sure that this array has meaningful content.

Overrides:
getFeatureDescriptions in class FeatureExtractor<java.lang.Float,float[]>
Returns:
the feature descriptions.