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.

  • Lower and upper bounds for Frequency

    Declaration

    Swift

    public static let frequencyRange: ClosedRange<Double>
  • Lower and upper bounds for Amplitude

    Declaration

    Swift

    public static let amplitudeRange: ClosedRange<Double>
  • Lower and upper bounds for Index

    Declaration

    Swift

    public static let indexRange: ClosedRange<Double>
  • Lower and upper bounds for Detuning Offset

    Declaration

    Swift

    public static let detuningOffsetRange: ClosedRange<Double>
  • Lower and upper bounds for Detuning Multiplier

    Declaration

    Swift

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

    Declaration

    Swift

    public static let defaultFrequency: Double
  • Initial value for Amplitude

    Declaration

    Swift

    public static let defaultAmplitude: Double
  • Initial value for Index

    Declaration

    Swift

    public static let defaultIndex: Double
  • Initial value for Detuning Offset

    Declaration

    Swift

    public static let defaultDetuningOffset: Double
  • Initial value for Detuning Multiplier

    Declaration

    Swift

    public static let defaultDetuningMultiplier: Double
  • Initial value for Phase

    Declaration

    Swift

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

    Declaration

    Swift

    @objc
    open dynamic var rampDuration: Double { get set }
  • Frequency (in Hz)

    Declaration

    Swift

    @objc
    open dynamic var frequency: Double { get set }
  • Amplitude (typically a value between 0 and 1).

    Declaration

    Swift

    @objc
    open dynamic var amplitude: Double { get set }
  • Index of the wavetable to use (fractional are okay).

    Declaration

    Swift

    @objc
    open dynamic var index: Double { get set }
  • Frequency offset in Hz.

    Declaration

    Swift

    @objc
    open dynamic var detuningOffset: Double { get set }
  • Frequency detuning multiplier

    Declaration

    Swift

    @objc
    open dynamic var detuningMultiplier: 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 oscillator with defaults

    Declaration

    Swift

    public convenience override init()
  • Initialize this Morpher node

    Declaration

    Swift

    @objc
    public init(
        waveformArray: [AKTable],
        frequency: Double = defaultFrequency,
        amplitude: Double = defaultAmplitude,
        index: Double = defaultIndex,
        detuningOffset: Double = defaultDetuningOffset,
        detuningMultiplier: Double = defaultDetuningMultiplier,
        phase: Double = defaultPhase)

    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

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

    Declaration

    Swift

    @objc
    open func stop()