AKClarinet

open class AKClarinet : AKNode, AKToggleable, AKComponent

STK Clarinet

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

    Declaration

    Swift

    @objc
    open dynamic var rampDuration: Double { get set }
  • Variable frequency. Values less than the initial frequency will be doubled until it is greater than that.

    Declaration

    Swift

    @objc
    open dynamic var frequency: Double { get set }
  • Amplitude

    Declaration

    Swift

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

    Declaration

    Swift

    @objc
    open dynamic var isStarted: Bool { get }
  • Initialize the STK Clarinet model

    Declaration

    Swift

    @objc
    public init(
        frequency: Double = 440,
        amplitude: Double = 0.5)

    Parameters

    frequency

    Variable frequency. Values less than the initial frequency will be doubled until it is greater than that.

    amplitude

    Amplitude

  • Trigger the sound with current parameters

    Declaration

    Swift

    open func trigger()
  • Trigger the sound with a set of parameters

    Declaration

    Swift

    open func trigger(frequency: Double, amplitude: Double = 1)

    Parameters

    frequency

    Frequency in Hz

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