AKFMOscillator

open class AKFMOscillator: AKNode, AKToggleable, AKComponent

Classic FM Synthesis audio generation.

  • Four letter unique description of the node

    Declaration

    Swift

    public static let ComponentDescription = AudioComponentDescription(generator: "fosc")
  • Declaration

    Swift

    open class AKFMOscillator: AKNode, AKToggleable, AKComponent
  • Ramp Time represents the speed at which parameters are allowed to change

    Declaration

    Swift

    @objc open dynamic var rampTime: Double = AKSettings.rampTime
  • In cycles per second, or Hz, this is the common denominator for the carrier and modulating frequencies.

    Declaration

    Swift

    @objc open dynamic var baseFrequency: Double = 440
  • This multiplied by the baseFrequency gives the carrier frequency.

    Declaration

    Swift

    @objc open dynamic var carrierMultiplier: Double = 1.0
  • This multiplied by the baseFrequency gives the modulating frequency.

    Declaration

    Swift

    @objc open dynamic var modulatingMultiplier: Double = 1
  • This multiplied by the modulating frequency gives the modulation amplitude.

    Declaration

    Swift

    @objc open dynamic var modulationIndex: Double = 1
  • Output Amplitude.

    Declaration

    Swift

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

    Declaration

    Swift

    @objc open dynamic var isStarted: Bool
  • Initialize the oscillator with defaults

    Declaration

    Swift

    public convenience override init()
  • Initialize this oscillator node

    Declaration

    Swift

    public init(
            waveform: AKTable,
            baseFrequency: Double = 440,
            carrierMultiplier: Double = 1.0,
            modulatingMultiplier: Double = 1,
            modulationIndex: Double = 1,
            amplitude: Double = 1)

    Parameters

    waveform

    Shape of the oscillation

    baseFrequency

    In Hz, this is the common denominator for the carrier and modulating frequencies.

    carrierMultiplier

    This multiplied by the baseFrequency gives the carrier frequency.

    modulatingMultiplier

    This multiplied by the baseFrequency gives the modulating frequency.

    modulationIndex

    This multiplied by the modulating frequency gives the modulation amplitude.

    amplitude

    Output Amplitude.

  • 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()
  • Stun Ray Preset

    Declaration

    Swift

    public func presetStunRay()
  • Fog Horn Preset

    Declaration

    Swift

    public func presetFogHorn()
  • Buzzer Preset

    Declaration

    Swift

    public func presetBuzzer()
  • Spiral Preset

    Declaration

    Swift

    public func presetSpiral()
  • Wobble Preset

    Declaration

    Swift

    public func presetWobble()