AKAmplitudeEnvelope

open class AKAmplitudeEnvelope: AKNode, AKToggleable, AKComponent, AKInput

Triggerable classic ADSR envelope

  • Four letter unique description of the node

    Declaration

    Swift

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

    Declaration

    Swift

    @objc open dynamic var rampTime: Double = AKSettings.rampTime
  • Attack time

    Declaration

    Swift

    @objc open dynamic var attackDuration: Double = 0.1
  • Decay time

    Declaration

    Swift

    @objc open dynamic var decayDuration: Double = 0.1
  • Sustain Level

    Declaration

    Swift

    @objc open dynamic var sustainLevel: Double = 1.0
  • Release time

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    public init(
            _ input: AKNode? = nil,
            attackDuration: Double = 0.1,
            decayDuration: Double = 0.1,
            sustainLevel: Double = 1.0,
            releaseDuration: Double = 0.1)

    Parameters

    input

    Input node to process

    attackDuration

    Attack time

    decayDuration

    Decay time

    sustainLevel

    Sustain Level

    releaseDuration

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