Package clickDetector
Class TriggerFilter
java.lang.Object
clickDetector.TriggerFilter
- Author:
- Doug Gillespie
Really simple filter for creating decaying averages of the rectified signals in the click triggers.
-
Constructor Summary
ConstructorDescriptionTriggerFilter
(double alpha, double initialValue) TriggerFilter
(double alpha1, double alpha2, double initialValue) -
Method Summary
-
Constructor Details
-
TriggerFilter
public TriggerFilter(double alpha, double initialValue) - Parameters:
alpha
- decay constantinitialValue
- Initidalisation value
-
TriggerFilter
public TriggerFilter(double alpha1, double alpha2, double initialValue) - Parameters:
alpha1
- decay constantalpha2
- decay constant for use when trigger function is above thresholdinitialValue
- initialisation value
-
-
Method Details
-
runFilter
public double runFilter(double newValue, boolean overThreshold) Runs the filter ona single sample- Parameters:
newValue
- filter inputoverThreshold
- over threshold flag (controls which alpha value to use)- Returns:
- filter output
-
setMemory
public void setMemory(double memory)
-