AKTanhDistortion

open class AKTanhDistortion: AKNode, AKToggleable, AKComponent, AKInput

Distortion using a modified hyperbolic tangent function.

  • Four letter unique description of the node

    Declaration

    Swift

    public static let ComponentDescription = AudioComponentDescription(effect: "dist")
  • Ramp Time represents the speed at which parameters are allowed to change

    Declaration

    Swift

    @objc open dynamic 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

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    @objc open dynamic var isStarted: Bool
  • Initialize this distortion node

    Declaration

    Swift

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

    Parameters

    input

    Input node to process

    pregain

    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

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

    Declaration

    Swift

    @objc open func stop()