AKOscillatorBank

open class AKOscillatorBank: AKPolyphonicNode, AKComponent

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

  • Four letter unique description of the node

    Declaration

    Swift

    public static let ComponentDescription = AudioComponentDescription(instrument: "oscb")
  • Waveform of the oscillator

    Declaration

    Swift

    open var waveform: AKTable?
  • Ramp Time represents the speed at which parameters are allowed to change

    Declaration

    Swift

    @objc open dynamic var rampTime: Double = AKSettings.rampTime
  • Attack time

    Declaration

    Swift

    @objc open dynamic var attackDuration: Double = 0.1
  • Decay time

    Declaration

    Swift

    @objc open dynamic var decayDuration: Double = 0.1
  • Sustain Level

    Declaration

    Swift

    @objc open dynamic var sustainLevel: Double = 1.0
  • Release time

    Declaration

    Swift

    @objc open dynamic var releaseDuration: Double = 0.1
  • Pitch Bend as number of semitones

    Declaration

    Swift

    @objc open dynamic var pitchBend: Double = 0
  • Vibrato Depth in semitones

    Declaration

    Swift

    @objc open dynamic var vibratoDepth: Double = 0
  • Vibrato Rate in Hz

    Declaration

    Swift

    @objc open dynamic var vibratoRate: Double = 0
  • Initialize the oscillator with defaults

    Declaration

    Swift

    public convenience override init()
  • Initialize this oscillator node

    Declaration

    Swift

    public init(
            waveform: AKTable,
            attackDuration: Double = 0.1,
            decayDuration: Double = 0.1,
            sustainLevel: Double = 1.0,
            releaseDuration: Double = 0.1,
            pitchBend: Double = 0,
            vibratoDepth: Double = 0,
            vibratoRate: Double = 0)

    Parameters

    waveform

    The waveform of oscillation

    attackDuration

    Attack time

    decayDuration

    Decay time

    sustainLevel

    Sustain Level

    releaseDuration

    Release time

    pitchBend

    Change of pitch in semitones

    vibratoDepth

    Vibrato size in semitones

    vibratoRate

    Frequency of vibrato in Hz

  • Declaration

    Swift

    open override func play(noteNumber: MIDINoteNumber, velocity: MIDIVelocity, frequency: Double)

    Parameters

    noteNumber
    velocity
    frequency
  • Function to stop or bypass the node, both are equivalent

    Declaration

    Swift

    open override func stop(noteNumber: MIDINoteNumber)