Class Distortion

java.lang.Object
de.pottgames.tuningfork.SoundEffectData
de.pottgames.tuningfork.Distortion

public class Distortion extends SoundEffectData
The distortion effect simulates turning up (overdriving) the gain stage on a guitar amplifier or adding a distortion pedal to an instrument’s output. It is achieved by clipping the signal (adding more square wave-like components) and adding rich harmonics. The distortion effect could be very useful for adding extra dynamics to engine sounds in a driving simulator, or modifying samples such as vocal communications. The OpenAL Effects Extension distortion effect also includes EQ on the output signal, to help ‘rein in’ excessive frequency content in distorted audio. A low-pass filter is applied to input signal before the distortion effect, to limit excessive distorted signals at high frequencies.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    float
    Range: 0.0 - 1.0, Default: 0.2
    This property controls the shape of the distortion.
    float
    Range: 80.0 - 24000.0, Default: 3600.0
    This property controls the bandwidth of the post-distortion attenuation.
    float
    Range: 80.0 - 24000.0, Default: 3600.0
    This property controls the frequency at which the post-distortion attenuation (Distortion Gain) is active.
    float
    Range: 0.01 - 1.0, Default: 0.05
    This property allows you to attenuate the distorted sound.
    float
    Range: 80.0 - 24000.0, Default: 8000.0
    Input signal can have a low pass filter applied, to limit the amount of high frequency signal feeding into the distortion effect.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    apply(int effectId)
     
    boolean
     
    int
     
    static Distortion
     
    static Distortion
     
     

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • edge

      public float edge
      Range: 0.0 - 1.0, Default: 0.2
      This property controls the shape of the distortion. The higher the value for Edge, the ‘dirtier’ and ‘fuzzier’ the effect.
    • gain

      public float gain
      Range: 0.01 - 1.0, Default: 0.05
      This property allows you to attenuate the distorted sound.
    • lowpassCutoff

      public float lowpassCutoff
      Range: 80.0 - 24000.0, Default: 8000.0
      Input signal can have a low pass filter applied, to limit the amount of high frequency signal feeding into the distortion effect.
    • eqCenter

      public float eqCenter
      Range: 80.0 - 24000.0, Default: 3600.0
      This property controls the frequency at which the post-distortion attenuation (Distortion Gain) is active.
    • eqBandwidth

      public float eqBandwidth
      Range: 80.0 - 24000.0, Default: 3600.0
      This property controls the bandwidth of the post-distortion attenuation.
  • Constructor Details

    • Distortion

      public Distortion()
  • Method Details