AKFMOscillator

open class AKFMOscillator : AKNode, AKToggleable, AKComponent

Classic FM Synthesis audio generation.

  • Lower and upper bounds for Base Frequency

    Declaration

    Swift

    public static let baseFrequencyRange: ClosedRange<Double>
  • Lower and upper bounds for Carrier Multiplier

    Declaration

    Swift

    public static let carrierMultiplierRange: ClosedRange<Double>
  • Lower and upper bounds for Modulating Multiplier

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    public static let defaultBaseFrequency: Double
  • Initial value for Carrier Multiplier

    Declaration

    Swift

    public static let defaultCarrierMultiplier: Double
  • Initial value for Modulating Multiplier

    Declaration

    Swift

    public static let defaultModulatingMultiplier: Double
  • Initial value for Modulation Index

    Declaration

    Swift

    public static let defaultModulationIndex: Double
  • Initial value for Amplitude

    Declaration

    Swift

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

    Declaration

    Swift

    @objc
    open dynamic var rampDuration: Double { get set }
  • 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 { get set }
  • This multiplied by the baseFrequency gives the carrier frequency.

    Declaration

    Swift

    @objc
    open dynamic var carrierMultiplier: Double { get set }
  • This multiplied by the baseFrequency gives the modulating frequency.

    Declaration

    Swift

    @objc
    open dynamic var modulatingMultiplier: Double { get set }
  • This multiplied by the modulating frequency gives the modulation amplitude.

    Declaration

    Swift

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

    Declaration

    Swift

    @objc
    open dynamic var amplitude: 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,
        baseFrequency: Double = defaultBaseFrequency,
        carrierMultiplier: Double = defaultCarrierMultiplier,
        modulatingMultiplier: Double = defaultModulatingMultiplier,
        modulationIndex: Double = defaultModulationIndex,
        amplitude: Double = defaultAmplitude)

    Parameters

    waveform

    The waveform of oscillation

    baseFrequency

    In cycles per second, or 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()