AKAmplitudeTracker

open class AKAmplitudeTracker : AKNode, AKToggleable, AKComponent, AKInput

Performs a root-mean-square on a signal to get overall amplitude of a signal. The output signal looks similar to that of a classic VU meter.

  • Declaration

    Swift

    public typealias AKAudioUnitType = AKAmplitudeTrackerAudioUnit
  • Four letter unique description of the node

    Declaration

    Swift

    public static let ComponentDescription: AudioComponentDescription
  • Tells whether the node is processing (ie. started, playing, or active)

    Declaration

    Swift

    @objc
    open dynamic var isStarted: Bool { get }
  • Detected amplitude

    Declaration

    Swift

    @objc
    open dynamic var amplitude: Double { get }
  • Detected amplitude

    Declaration

    Swift

    @objc
    open dynamic var leftAmplitude: Double { get }
  • Detected right amplitude

    Declaration

    Swift

    @objc
    open dynamic var rightAmplitude: Double { get }
  • Threshold amplitude

    Declaration

    Swift

    @objc
    open dynamic var threshold: Double { get set }
  • Initialize this amplitude tracker node

    Declaration

    Swift

    @objc
    public init(
        _ input: AKNode? = nil,
        halfPowerPoint: Double = 10,
        threshold: Double = 1,
        thresholdCallback: @escaping AKThresholdCallback = { _ in })

    Parameters

    input

    Input node to process

    halfPowerPoint

    Half-power point (in Hz) of internal lowpass filter.

    threshold

    point at which the callback is called

    thresholdCallback

    function to execute when the threshold is reached

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