sw-synth
    Preparing search index...

    Class OscillatorVoiceBase

    Oscillator with ADSR envelope. Represents a single "channel" of polyphony. Should be reused for multiple notes.

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • context: BaseAudioContext
      • destination: AudioNode
      • log: (msg: string) => void
      • oscillatorClass: {
            prototype: OscillatorNode;
            new (
                context: BaseAudioContext,
                options?: OscillatorOptions,
            ): OscillatorNode;
        }

      Returns OscillatorVoiceBase

    Properties

    age: number
    context: BaseAudioContext
    envelope: GainNode
    lastNoteOff?: () => void
    log: (msg: string) => void
    noteId: number
    oscillator: OscillatorNode
    pitchBend: WaveShaperNode
    voiceId: number

    Methods

    • Returns void

    • Parameters

      Returns () => void