AKPluckedString

open class AKPluckedString: AKNode, AKToggleable, AKComponent

Karplus-Strong plucked string instrument.

  • Four letter unique description of the node

    Declaration

    Swift

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

    Declaration

    Swift

    @objc open dynamic var rampTime: Double = AKSettings.rampTime
  • 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 = 110
  • 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 this pluck node

    Declaration

    Swift

    public init(
            frequency: Double = 440,
            amplitude: Double = 0.5,
            lowestFrequency: Double = 110)

    Parameters

    frequency

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

    amplitude

    Amplitude

    lowestFrequency

    This frequency is used to allocate all the buffers needed for the delay. This should be the lowest frequency you plan on using.

  • Trigger the sound with an optional set of parameters

    • frequency: Frequency in Hz
      • amplitude amplitude: Volume

    Declaration

    Swift

    open func trigger(frequency: Double, 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()