AKStringResonator

open class AKStringResonator: AKNode, AKToggleable, AKComponent

AKStringResonator passes the input through a network composed of comb, low-pass and all-pass filters, similar to the one used in some versions of the Karplus-Strong algorithm, creating a string resonator effect. The fundamental frequency of the “string” is controlled by the fundamentalFrequency. This operation can be used to simulate sympathetic resonances to an input signal.

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

    Declaration

    Swift

    open var rampTime: Double = AKSettings.rampTime
  • Fundamental frequency of string.

    Declaration

    Swift

    open var fundamentalFrequency: Double = 100
  • Feedback amount (value between 0-1). A value close to 1 creates a slower decay and a more pronounced resonance. Small values may leave the input signal unaffected. Depending on the filter frequency, typical values are > .9.

    Declaration

    Swift

    open var feedback: Double = 0.95
  • Tells whether the node is processing (ie. started, playing, or active)

    Declaration

    Swift

    open var isStarted: Bool
  • Initialize this filter node

    • Parameters:
      • input: Input node to process
      • fundamentalFrequency: Fundamental frequency of string.
      • feedback: Feedback amount (value between 0-1). A value close to 1 creates a slower decay and a more pronounced resonance. Small values may leave the input signal unaffected. Depending on the filter frequency, typical values are > .9.

    Declaration

    Swift

    public init(
            _ input: AKNode,
            fundamentalFrequency: Double = 100,
            feedback: Double = 0.95)

    Parameters

    input

    Input node to process

    fundamentalFrequency

    Fundamental frequency of string.

    feedback

    Feedback amount (value between 0-1). A value close to 1 creates a slower decay and a more pronounced resonance. Small values may leave the input signal unaffected. Depending on the filter frequency, typical values are > .9.

  • Function to start, play, or activate the node, all do the same thing

    Declaration

    Swift

    open func start()
  • Function to stop or bypass the node, both are equivalent

    Declaration

    Swift

    open func stop()