|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.beadsproject.beads.analysis.FeatureExtractor<float[],float[]> net.beadsproject.beads.analysis.featureextractors.Peaks
public class Peaks
Peaks finds the strongest N peaks in a signal passed from a PowerSpectrum
, where N is the specified number of features. Peaks must be set as a listener to a PowerSpectrum
object to work properly.
Field Summary |
---|
Fields inherited from class net.beadsproject.beads.analysis.FeatureExtractor |
---|
featureDescriptions, features, name, numFeatures |
Constructor Summary | |
---|---|
Peaks(AudioContext context)
Instantiates a new Peaks. |
|
Peaks(AudioContext context,
int numFeatures)
Instantiates a new Peaks with the given number of features. |
Method Summary | |
---|---|
void |
printFeatures()
Prints the features. |
void |
process(float[] powerSpectrum)
Process some data of type P (specified by the class def). |
void |
setNumberOfFeatures(int numFeatures)
Sets the number of features. |
Methods inherited from class net.beadsproject.beads.analysis.FeatureExtractor |
---|
getFeatureDescriptions, getFeatures, getName, getNumberOfFeatures, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Peaks(AudioContext context)
context
- the AudioContext.public Peaks(AudioContext context, int numFeatures)
context
- the AudioContext.numFeatures
- the number of features.Method Detail |
---|
public void process(float[] powerSpectrum)
FeatureExtractor
process
in class FeatureExtractor<float[],float[]>
powerSpectrum
- the data.public void printFeatures()
public void setNumberOfFeatures(int numFeatures)
FeatureExtractor
setNumberOfFeatures
in class FeatureExtractor<float[],float[]>
numFeatures
- the new number of features.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |