AKShaker

open class AKShaker: AKNode, AKToggleable, AKComponent

STK Shaker

  • Four letter unique description of the node

    Declaration

    Swift

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

    Declaration

    Swift

    @objc open dynamic var rampTime: Double = AKSettings.rampTime
  • Type of shaker to use

    Declaration

    Swift

    open var type: AKShakerType = .maraca
  • Amplitude

    Declaration

    Swift

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

    Declaration

    Swift

    @objc open dynamic var isStarted: Bool
  • Initialize the STK Shaker model

    Declaration

    Swift

    public init(type: AKShakerType = .maraca, amplitude: Double = 0.5)

    Parameters

    amplitude

    Overall level

  • Trigger the sound with an optional set of parameters

    • amplitude amplitude: Volume

    Declaration

    Swift

    open func trigger(amplitude: Double = -1)
  • 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()