AKTanhDistortion

open class AKTanhDistortion: AKNode, AKToggleable, AKComponent

Distortion using a modified hyperbolic tangent function.

  • Ramp Time represents the speed at which parameters are allowed to change

    Declaration

    Swift

    open var rampTime: Double = AKSettings.rampTime
  • Determines the amount of gain applied to the signal before waveshaping. A value of 1 gives slight distortion.

    Declaration

    Swift

    open var pregain: Double = 2.0
  • Gain applied after waveshaping

    Declaration

    Swift

    open var postgain: Double = 0.5
  • Shape of the positive part of the signal. A value of 0 gets a flat clip.

    Declaration

    Swift

    open var postiveShapeParameter: Double = 0.0
  • Like the positive shape parameter, only for the negative part.

    Declaration

    Swift

    open var negativeShapeParameter: Double = 0.0
  • Tells whether the node is processing (ie. started, playing, or active)

    Declaration

    Swift

    open var isStarted: Bool
  • Initialize this distortion node

    • Parameters:
      • input: Input node to process
      • pregain: Determines the amount of gain applied to the signal before waveshaping. A value of 1 gives slight distortion.
      • postgain: Gain applied after waveshaping
      • postiveShapeParameter: Shape of the positive part of the signal. A value of 0 gets a flat clip.
      • negativeShapeParameter: Like the positive shape parameter, only for the negative part.

    Declaration

    Swift

    public init(
            _ input: AKNode,
            pregain: Double = 2.0,
            postgain: Double = 0.5,
            postiveShapeParameter: Double = 0.0,
            negativeShapeParameter: Double = 0.0)

    Parameters

    input

    Input node to process

    pregain

    Determines the amount of gain applied to the signal before waveshaping. A value of 1 gives slight distortion.

    postgain

    Gain applied after waveshaping

    postiveShapeParameter

    Shape of the positive part of the signal. A value of 0 gets a flat clip.

    negativeShapeParameter

    Like the positive shape parameter, only for the negative part.

  • Function to start, play, or activate the node, all do the same thing

    Declaration

    Swift

    open func start()
  • Function to stop or bypass the node, both are equivalent

    Declaration

    Swift

    open func stop()