AKDistortion

open class AKDistortion : AKNode, AKToggleable, AUEffect, AKInput

AudioKit version of Apple’s Distortion Audio Unit

  • Four letter unique description of the node

    Declaration

    Swift

    public static let ComponentDescription: AudioComponentDescription
  • Delay (Milliseconds) ranges from 0.1 to 500 (Default: 0.1)

    Declaration

    Swift

    @objc
    open dynamic var delay: Double { get set }
  • Decay (Rate) ranges from 0.1 to 50 (Default: 1.0)

    Declaration

    Swift

    @objc
    open dynamic var decay: Double { get set }
  • Delay Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    Declaration

    Swift

    @objc
    open dynamic var delayMix: Double { get set }
  • Decimation (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    Declaration

    Swift

    @objc
    open dynamic var decimation: Double { get set }
  • Rounding (Normalized Value) ranges from 0 to 1 (Default: 0.0)

    Declaration

    Swift

    @objc
    open dynamic var rounding: Double { get set }
  • Decimation Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    Declaration

    Swift

    @objc
    open dynamic var decimationMix: Double { get set }
  • Linear Term (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    Declaration

    Swift

    @objc
    open dynamic var linearTerm: Double { get set }
  • Squared Term (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    Declaration

    Swift

    @objc
    open dynamic var squaredTerm: Double { get set }
  • Cubic Term (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    Declaration

    Swift

    @objc
    open dynamic var cubicTerm: Double { get set }
  • Polynomial Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    Declaration

    Swift

    @objc
    open dynamic var polynomialMix: Double { get set }
  • Ring Mod Freq1 (Hertz) ranges from 0.5 to 8000 (Default: 100)

    Declaration

    Swift

    @objc
    open dynamic var ringModFreq1: Double { get set }
  • Ring Mod Freq2 (Hertz) ranges from 0.5 to 8000 (Default: 100)

    Declaration

    Swift

    @objc
    open dynamic var ringModFreq2: Double { get set }
  • Ring Mod Balance (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    Declaration

    Swift

    @objc
    open dynamic var ringModBalance: Double { get set }
  • Ring Mod Mix (Normalized Value) ranges from 0 to 1 (Default: 0.0)

    Declaration

    Swift

    @objc
    open dynamic var ringModMix: Double { get set }
  • Soft Clip Gain (dB) ranges from -80 to 20 (Default: -6)

    Declaration

    Swift

    @objc
    open dynamic var softClipGain: Double { get set }
  • Final Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    Declaration

    Swift

    @objc
    open dynamic var finalMix: Double { get set }
  • Tells whether the node is processing (ie. started, playing, or active)

    Declaration

    Swift

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

    Declaration

    Swift

    @objc
    public init(
        _ input: AKNode? = nil,
        delay: Double = 0.1,
        decay: Double = 1.0,
        delayMix: Double = 0.5,
        decimation: Double = 0.5,
        rounding: Double = 0.0,
        decimationMix: Double = 0.5,
        linearTerm: Double = 0.5,
        squaredTerm: Double = 0.5,
        cubicTerm: Double = 0.5,
        polynomialMix: Double = 0.5,
        ringModFreq1: Double = 100,
        ringModFreq2: Double = 100,
        ringModBalance: Double = 0.5,
        ringModMix: Double = 0.0,
        softClipGain: Double = -6,
        finalMix: Double = 0.5)

    Parameters

    input

    Input node to process

    delay

    Delay (Milliseconds) ranges from 0.1 to 500 (Default: 0.1)

    decay

    Decay (Rate) ranges from 0.1 to 50 (Default: 1.0)

    delayMix

    Delay Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    decimation

    Decimation (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    rounding

    Rounding (Normalized Value) ranges from 0 to 1 (Default: 0.0)

    decimationMix

    Decimation Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    linearTerm

    Linear Term (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    squaredTerm

    Squared Term (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    cubicTerm

    Cubic Term (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    polynomialMix

    Polynomial Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    ringModFreq1

    Ring Mod Freq1 (Hertz) ranges from 0.5 to 8000 (Default: 100)

    ringModFreq2

    Ring Mod Freq2 (Hertz) ranges from 0.5 to 8000 (Default: 100)

    ringModBalance

    Ring Mod Balance (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    ringModMix

    Ring Mod Mix (Normalized Value) ranges from 0 to 1 (Default: 0.0)

    softClipGain

    Soft Clip Gain (dB) ranges from -80 to 20 (Default: -6)

    finalMix

    Final Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)

  • 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()
  • Disconnect the node

    Declaration

    Swift

    override open func disconnect()