Package voltage.processors

# Class Distortion

java.lang.Object
voltage.processors.Distortion

public class Distortion extends Object
A simple class for distortion.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Distortion(double distortionAmount)`
  Distortion constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `double`
  `Process(double input)`
  Process a sample input.
  `void`
  `SetDistortion(double amount)`
  Sets the distortion amount
  `void`
  `SetPostGain(double postGain)`
  Set a gain after distortion is applied.
  `void`
  `SetPreGain(double preGain)`
  Set a gain before distortion is applied.

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

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

- ## Constructor Details

  - ### Distortion

    public Distortion(double distortionAmount)
    Distortion constructor.
    Parameters:
      `distortionAmount` - the amount of distortion from 0.0 to 1.0

- ## Method Details

  - ### SetPreGain

    public void SetPreGain(double preGain)
    Set a gain before distortion is applied.
    Parameters:
      `preGain` - the amount of gain to apply. 1.0 is normal/no pregain.

  - ### SetDistortion

    public void SetDistortion(double amount)
    Sets the distortion amount
    Parameters:
      `amount` - the distortion amount from 0.0 to 1.0

  - ### SetPostGain

    public void SetPostGain(double postGain)
    Set a gain after distortion is applied.
    Parameters:
      `postGain` - the amount of gain to apply. 1.0 is normal/no postGain.

  - ### Process

    public double Process(double input)
    Process a sample input.
    Parameters:
      `input` - the input sample.
    Returns:
      the distorted sample.