AKCompressor

open class AKCompressor : AKNode, AKToggleable, AUEffect, AKInput

AudioKit Compressor based on Apple’s DynamicsProcessor Audio Unit

  • Four letter unique description of the node

    Declaration

    Swift

    public static let ComponentDescription: AudioComponentDescription
  • Threshold (dB) ranges from -40 to 20 (Default: -20)

    Declaration

    Swift

    @objc
    open dynamic var threshold: Double { get set }
  • Head Room (dB) ranges from 0.1 to 40.0 (Default: 5)

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    @objc
    open dynamic var releaseDuration: 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 }
  • Master Gain (dB) ranges from -40 to 40 (Default: 0)

    Declaration

    Swift

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

    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,
        attackDuration: Double = 0.001,
        releaseDuration: Double = 0.05,
        masterGain: Double = 0)

    Parameters

    input

    Input node to process

    threshold

    Threshold (dB) ranges from -40 to 20 (Default: -20)

    headRoom

    Head Room (dB) ranges from 0.1 to 40.0 (Default: 5)

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