Class EnvelopeGenerator

This private class is for Envelope Generator.

Implements

Constructors

Properties

MIN_GAIN: number = 1e-3

Methods

  • This method clears variables for managing instance of GainNode.

    Parameters

    • disconnected: boolean

      This argument is in order to determine whether disconnect AudioNode.

    Returns void

    This is returned for method chain.

  • This method gets instance of GainNode for Envelope Generator.

    Parameters

    • index: number

      This argument is index of array that contains instance of GainNode for Envelope Generator.

    Returns null | GainNode

    This is returned as instance of GainNode for Envelope Generator.

  • This method determines whether the all of gain schedulings have ended.

    Returns boolean

    If the all of gain schedulings have ended, this value is true. Otherwise, this value is false.

  • This method connects instance of AudioNode.

    Parameters

    • index: number

      This argument is in order to select instance of GainNode that is Envelope Generator.

    • input: null | AudioNode

      This argument is instance of AudioNode as input.

    • output: null | AudioNode

      This argument is instance of AudioNode as output.

    Returns void

  • This method sets instance of GainNode for Envelope Generator.

    Parameters

    • index: number

      This argument is index of array that contains instance of GainNode for Envelope Generator.

    Returns void

    This is returned for method chain.

  • This method changes gain (Attack or Decay or Sustain -> Release).

    Parameters

    • stopTime: number

      This argument is start time of Release.

    • OptionaluseCurve: boolean

      This argument is to use different methods. The default value is false.

    Returns void