AKPWMOscillator

open class AKPWMOscillator : AKNode, AKToggleable, AKComponent

Casio-style phase distortion with pivot point on the X axis This module is designed to emulate the classic phase distortion synthesis technique. From the mid 90’s. The technique reads the first and second halves of the ftbl at different rates in order to warp the waveform. For example, pdhalf can smoothly transition a sinewave into something approximating a sawtooth wave.

  • 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 }
  • Duty Cycle Width 0 - 1

    Declaration

    Swift

    @objc
    open dynamic var pulseWidth: 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(
        frequency: Double,
        amplitude: Double = 1.0,
        pulseWidth: Double = 0.5,
        detuningOffset: Double = 0,
        detuningMultiplier: Double = 1)

    Parameters

    frequency

    In cycles per second, or Hz.

    amplitude

    Output amplitude

    pulseWidth

    Duty cycle width (range 0-1).

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