AKMorphingOscillator

open class AKMorphingOscillator: AKNode, AKToggleable, AKComponent

This is an oscillator with linear interpolation that is capable of morphing between an arbitrary number of wavetables.

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

    Declaration

    Swift

    open var rampTime: Double = AKSettings.rampTime
  • In cycles per second, or Hz.

    Declaration

    Swift

    open var frequency: Double = 440
  • Output Amplitude.

    Declaration

    Swift

    open var amplitude: Double = 1
  • Index of the wavetable to use (fractional are okay).

    Declaration

    Swift

    open var index: Double = 0.0
  • Frequency offset in Hz.

    Declaration

    Swift

    open var detuningOffset: Double = 0
  • Frequency detuning multiplier

    Declaration

    Swift

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

    Declaration

    Swift

    open var isStarted: Bool
  • Initialize the oscillator with defaults

    Declaration

    Swift

    public convenience override init()
  • Initialize this Morpher node

    • Parameters:
      • waveformArray: An array of exactly four waveforms
      • frequency: Frequency (in Hz)
      • amplitude: Amplitude (typically a value between 0 and 1).
      • index: Index of the wavetable to use (fractional are okay).
      • detuningOffset: Frequency offset in Hz.
      • detuningMultiplier: Frequency detuning multiplier
      • phase: Initial phase of waveform, expects a value 0-1

    Declaration

    Swift

    public init(
            waveformArray: [AKTable],
            frequency: Double = 440,
            amplitude: Double = 0.5,
            index: Double = 0.0,
            detuningOffset: Double = 0,
            detuningMultiplier: Double = 1,
            phase: Double = 0)

    Parameters

    waveformArray

    An array of exactly four waveforms

    frequency

    Frequency (in Hz)

    amplitude

    Amplitude (typically a value between 0 and 1).

    index

    Index of the wavetable to use (fractional are okay).

    detuningOffset

    Frequency offset in Hz.

    detuningMultiplier

    Frequency detuning multiplier

    phase

    Initial phase of waveform, expects a value 0-1

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