Package voltage.effects

# Class DelayEffect

java.lang.Object
voltage.effects.DelayEffect

public class DelayEffect extends Object
A simple delay

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static double`
  `MAX_DELAY_MS`
  Maximum amount of delay in milliseconds.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DelayEffect(double maxDelayTime)`
  Constructor for the DelayEffect

- ## Method Summary

  Modifier and Type
  Method
  Description
  `double`
  `ProcessSample(double input)`
  Process a sample.
  `void`
  `Reset()`
  Reset the effect This silences any values in the delay.
  `void`
  `SetDelayTime(double msDelay)`
  Set the delay time.
  `void`
  `SetDryVolume(double dryVolume)`
  Set the dry volume amount.
  `void`
  `SetFeedback(double amount)`
  Set the amount of feedback
  `void`
  `SetFilterCutoff(double frequency)`
  Set the filter cutoff
  `void`
  `SetWetVolume(double wetVolume)`
  Set the wet volume amount.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### MAX_DELAY_MS

    public static double MAX_DELAY_MS
    Maximum amount of delay in milliseconds.

- ## Constructor Details

  - ### DelayEffect

    public DelayEffect(double maxDelayTime)
    Constructor for the DelayEffect
    Parameters:
      `maxDelayTime` - the maximum delay time. Valid range is from 0 to MAX_DELAY_MS (5000 milliseconds)

- ## Method Details

  - ### SetDelayTime

    public void SetDelayTime(double msDelay)
    Set the delay time.
    Parameters:
      `msDelay` - millesconds to delay. Valid range is from 0 to MAX_DELAY_MS (5000 milliseconds)

  - ### SetFeedback

    public void SetFeedback(double amount)
    Set the amount of feedback
    Parameters:
      `amount` - how much of the signal should be sent through the effect again. (0.0 to 1.0)

  - ### SetDryVolume

    public void SetDryVolume(double dryVolume)
    Set the dry volume amount.
    Parameters:
      `dryVolume` - the amount of dry signal from 0.0 to 1.0

  - ### SetWetVolume

    public void SetWetVolume(double wetVolume)
    Set the wet volume amount.
    Parameters:
      `wetVolume` - the amount of wet (processed) signal from 0.0 to 1.0

  - ### SetFilterCutoff

    public void SetFilterCutoff(double frequency)
    Set the filter cutoff
    Parameters:
      `frequency` - valid range is from 0 to 20,000 hz.

  - ### Reset

    public void Reset()
    Reset the effect This silences any values in the delay.

  - ### ProcessSample

    public double ProcessSample(double input)
    Process a sample.
    Parameters:
      `input` - the input signal.
    Returns:
      the delayed signal.