net.beadsproject.beads.analysis.featureextractors
Class OnsetDetectorOld
java.lang.Object
net.beadsproject.beads.core.Bead
net.beadsproject.beads.analysis.FeatureExtractor<float[],float[]>
net.beadsproject.beads.analysis.featureextractors.OnsetDetectorOld
public class OnsetDetectorOld
- extends FeatureExtractor<float[],float[]>
Detects Onsets in input.
It updates listeners when onsets in energy are detected
Assumes input is a 1 element array
- Author:
- ben
Field Summary |
protected java.util.ArrayList<FeatureExtractor<?,float[]>> |
thresholdListeners
thresholdListeners receive the filtered threshold value
TODO: DISABLE AFTER DEBUG, BP170309 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
thresholdListeners
protected java.util.ArrayList<FeatureExtractor<?,float[]>> thresholdListeners
- thresholdListeners receive the filtered threshold value
TODO: DISABLE AFTER DEBUG, BP170309
OnsetDetectorOld
public OnsetDetectorOld()
useMeanFilterOfSize
public void useMeanFilterOfSize(int m)
- Tell the Peak Detector to use a moving average filter of a certain size.
- Parameters:
m
- Size of the filter. Larger = Smoother. M must be greater than 3.
setThreshold
public void setThreshold(float thresh)
getLastOnsetValue
public float getLastOnsetValue()
- Returns:
- the value at the last onset
setFilter
public void setFilter(Buffer b)
- Sets the window for the FIR filter.
- Parameters:
b
-
process
public void process(float[] input)
- process: assumes input is a 1 element array
- Specified by:
process
in class FeatureExtractor<float[],float[]>
- Parameters:
input
- the data.
addMessageListener
public void addMessageListener(Bead b)
removeMessageListener
public void removeMessageListener(Bead b)
addThresholdListener
public void addThresholdListener(FeatureExtractor<?,float[]> fe)