AKStringResonator

open class AKStringResonator : AKNode, AKToggleable, AKComponent, AKInput

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.

  • Lower and upper bounds for Fundamental Frequency

    Declaration

    Swift

    public static let fundamentalFrequencyRange: ClosedRange<Double>
  • Lower and upper bounds for Feedback

    Declaration

    Swift

    public static let feedbackRange: ClosedRange<Double>
  • Initial value for Fundamental Frequency

    Declaration

    Swift

    public static let defaultFundamentalFrequency: Double
  • Initial value for Feedback

    Declaration

    Swift

    public static let defaultFeedback: Double
  • Ramp Duration represents the speed at which parameters are allowed to change

    Declaration

    Swift

    @objc
    open dynamic var rampDuration: Double { get set }
  • Fundamental frequency of string.

    Declaration

    Swift

    @objc
    open dynamic var fundamentalFrequency: Double { get set }
  • 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

    @objc
    open dynamic var feedback: 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 filter node

    Declaration

    Swift

    @objc
    public init(
        _ input: AKNode? = nil,
        fundamentalFrequency: Double = defaultFundamentalFrequency,
        feedback: Double = defaultFeedback
        )

    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

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

    Declaration

    Swift

    @objc
    open func stop()