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.

  • 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 Pulse Width

    Declaration

    Swift

    public static let pulseWidthRange: 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 Pulse Width

    Declaration

    Swift

    public static let defaultPulseWidth: 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 }
  • 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 = defaultAmplitude,
        pulseWidth: Double = defaultPulseWidth,
        detuningOffset: Double = defaultDetuningOffset,
        detuningMultiplier: Double = defaultDetuningMultiplier)

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