AKExpander

open class AKExpander : AKNode, AKToggleable, AUEffect, AKInput

AudioKit Expander based on Apple’s DynamicsProcessor Audio Unit

  • Four letter unique description of the node

    Declaration

    Swift

    public static let ComponentDescription: AudioComponentDescription
  • Expansion Ratio (rate) ranges from 1 to 50.0 (Default: 2)

    Declaration

    Swift

    @objc
    open dynamic var expansionRatio: Double { get set }
  • Expansion Threshold (rate) ranges from 1 to 50.0 (Default: 2)

    Declaration

    Swift

    @objc
    open dynamic var expansionThreshold: Double { get set }
  • Attack Duration (secs) ranges from 0.0001 to 0.2 (Default: 0.001)

    Declaration

    Swift

    @objc
    open dynamic var attackDuration: Double { get set }
  • Release Duration (secs) ranges from 0.01 to 3 (Default: 0.05)

    Declaration

    Swift

    @objc
    open dynamic var releaseDuration: Double { get set }
  • Master Gain (dB) ranges from -40 to 40 (Default: 0)

    Declaration

    Swift

    @objc
    open dynamic var masterGain: Double { get set }
  • Compression Amount (dB) read only

    Declaration

    Swift

    @objc
    open dynamic var compressionAmount: Double { get }
  • Input Amplitude (dB) read only

    Declaration

    Swift

    @objc
    open dynamic var inputAmplitude: Double { get }
  • Output Amplitude (dB) read only

    Declaration

    Swift

    @objc
    open dynamic var outputAmplitude: Double { get }
  • Dry/Wet Mix (Default 1)

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    @objc
    public init(
        _ input: AKNode? = nil,
        threshold: Double = -20,
        headRoom: Double = 5,
        expansionRatio: Double = 2,
        expansionThreshold: Double = 2,
        attackDuration: Double = 0.001,
        releaseDuration: Double = 0.05,
        masterGain: Double = 0,
        compressionAmount: Double = 0,
        inputAmplitude: Double = 0,
        outputAmplitude: Double = 0)

    Parameters

    input

    Input node to process

    expansionRatio

    Expansion Ratio (rate) ranges from 1 to 50.0 (Default: 2)

    expansionThreshold

    Expansion Threshold (rate) ranges from 1 to 50.0 (Default: 2)

    attackDuration

    Attack Duration (secs) ranges from 0.0001 to 0.2 (Default: 0.001)

    releaseDuration

    Release Duration (secs) ranges from 0.01 to 3 (Default: 0.05)

    masterGain

    Master Gain (dB) ranges from -40 to 40 (Default: 0)

  • Declaration

    Swift

    public var inputNode: AVAudioNode { get }
  • 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()