AKAmplitudeEnvelope

open class AKAmplitudeEnvelope : AKNode, AKToggleable, AKComponent, AKInput

Triggerable classic ADSR envelope

  • Ramp Duration represents the speed at which parameters are allowed to change

    Declaration

    Swift

    @objc
    open dynamic var rampDuration: Double { get set }
  • Attack Duration in seconds

    Declaration

    Swift

    @objc
    open dynamic var attackDuration: Double { get set }
  • Decay Duration in seconds

    Declaration

    Swift

    @objc
    open dynamic var decayDuration: Double { get set }
  • Sustain Level

    Declaration

    Swift

    @objc
    open dynamic var sustainLevel: Double { get set }
  • Release Duration in seconds

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    @objc
    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 Duration in seconds

    decayDuration

    Decay Duration in seconds

    sustainLevel

    Sustain Level

    releaseDuration

    Release Duration in seconds

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