Package clickDetector

Class TriggerFilter

java.lang.Object
clickDetector.TriggerFilter

public class TriggerFilter extends Object
Author:
Doug Gillespie

Really simple filter for creating decaying averages of the rectified signals in the click triggers.

  • Constructor Details

    • TriggerFilter

      public TriggerFilter(double alpha, double initialValue)
      Parameters:
      alpha - decay constant
      initialValue - Initidalisation value
    • TriggerFilter

      public TriggerFilter(double alpha1, double alpha2, double initialValue)
      Parameters:
      alpha1 - decay constant
      alpha2 - decay constant for use when trigger function is above threshold
      initialValue - initialisation value
  • Method Details

    • runFilter

      public double runFilter(double newValue, boolean overThreshold)
      Runs the filter ona single sample
      Parameters:
      newValue - filter input
      overThreshold - over threshold flag (controls which alpha value to use)
      Returns:
      filter output
    • setMemory

      public void setMemory(double memory)