AKDynamicRangeCompressor

open class AKDynamicRangeCompressor: AKNode, AKToggleable, AKComponent, AKInput

Dynamic range compressor from Faust

  • Four letter unique description of the node

    Declaration

    Swift

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

    Declaration

    Swift

    @objc open dynamic var rampTime: Double = AKSettings.rampTime
  • Ratio to compress with, a value > 1 will compress

    Declaration

    Swift

    @objc open dynamic var ratio: Double = 1
  • Threshold (in dB) 0 = max

    Declaration

    Swift

    @objc open dynamic var threshold: Double = 0.0
  • Attack time

    Declaration

    Swift

    @objc open dynamic var attackTime: Double = 0.1
  • Release time

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    public init(
            _ input: AKNode? = nil,
            ratio: Double = 1,
            threshold: Double = 0.0,
            attackTime: Double = 0.1,
            releaseTime: Double = 0.1)

    Parameters

    input

    Input node to process

    ratio

    Ratio to compress with, a value > 1 will compress

    threshold

    Threshold (in dB) 0 = max

    attackTime

    Attack time

    releaseTime

    Release time

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