AKOscillator

open class AKOscillator : AKNode, AKToggleable, AKComponent

Reads from the table sequentially and repeatedly at given frequency. Linear interpolation is applied for table look up from internal phase values.

  • 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 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 Detuning Offset

    Declaration

    Swift

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

    Declaration

    Swift

    public static let defaultDetuningMultiplier: 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 cycles per second

    Declaration

    Swift

    @objc
    open dynamic var frequency: Double { get set }
  • Output Amplitude.

    Declaration

    Swift

    @objc
    open dynamic var amplitude: 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 oscillator node

    Declaration

    Swift

    @objc
    public init(
        waveform: AKTable,
        frequency: Double = defaultFrequency,
        amplitude: Double = defaultAmplitude,
        detuningOffset: Double = defaultDetuningOffset,
        detuningMultiplier: Double = defaultDetuningMultiplier)

    Parameters

    waveform

    The waveform of oscillation

    frequency

    Frequency in cycles per second

    amplitude

    Output Amplitude.

    detuningOffset

    Frequency offset in Hz.

    detuningMultiplier

    Frequency detuning multiplier

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