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(appleEffect: kAudioUnitSubType_Distortion)
  • Delay (Milliseconds) ranges from 0.1 to 500 (Default: 0.1)

    Declaration

    Swift

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

    Declaration

    Swift

    @objc open dynamic var decay: Double = 1.0
  • Delay Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    Declaration

    Swift

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

    Declaration

    Swift

    @objc open dynamic var decimation: Double = 0.5
  • Rounding (Normalized Value) ranges from 0 to 1 (Default: 0.0)

    Declaration

    Swift

    @objc open dynamic var rounding: Double = 0.0
  • Decimation Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    @objc open dynamic var ringModFreq2: Double = 100
  • Ring Mod Balance (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    Declaration

    Swift

    @objc open dynamic var ringModBalance: Double = 0.5
  • Ring Mod Mix (Normalized Value) ranges from 0 to 1 (Default: 0.0)

    Declaration

    Swift

    @objc open dynamic var ringModMix: Double = 0.0
  • Soft Clip Gain (dB) ranges from -80 to 20 (Default: -6)

    Declaration

    Swift

    @objc open dynamic var softClipGain: Double = -6
  • Final Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)

    Declaration

    Swift

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

    Declaration

    Swift

    @objc open dynamic var isStarted = true
  • Initialize the distortion node

    Declaration

    Swift

    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()