API Docs for: 2.7.1
Show:

BaseEffect Class

Module: Core

Pseudo AudioNode class the encapsulates basic functionality of an Audio Node. To be extended by all other Effects

Constructor

BaseEffect

(
  • [context]
)

Parameters:

  • [context] AudioContext optional

    AudioContext in which this Sound is defined.

Methods

connect

(
  • destination
  • [output]
  • [input]
)

If the parameter output is an AudioNode, it connects to the outputNode. If the output is a BaseEffect, it will connect BaseEffect's outputNode to the output's inputNode.

Parameters:

  • destination AudioNode

    AudioNode to connect to.

  • [output] Number optional

    Index describing which output of the AudioNode from which to connect.

  • [input] Number optional

    Index describing which input of the destination AudioNode to connect to.

disconnect

(
  • [outputIndex]
)

Disconnects the Sound from the AudioNode Chain.

Parameters:

  • [outputIndex] Number optional

    Index describing which output of the AudioNode to disconnect.

listParams

(
  • [paramArray]
)

List all SPAudioParams this Sound exposes

Parameters:

  • [paramArray] Array optional

    Array of all the SPAudioParams this Sound exposes.

Properties

audioContext

AudioContext

Web Audio API's AudioContext. If the context passed to the constructor is an AudioContext, a new one is created here.

destinations

Array

Set of nodes the output of this effect is currently connected to.

inputNode

AudioNode final

The output node of this effect. This node will be connected to the next Effect or destination

isInitialized

Boolean

If Sound is currently initialized.

Default: false

isPlaying

Boolean

If Sound is currently playing.

Default: false

modelName

String

String name of the effect.

Default: "Model"

numberOfInputs

Number

Number of inputs

Default: 0

numberOfOutputs

Number

Number of outputs

Default: 0

outputNode

AudioNode final

The output node of this effect. This node will be connected to the next Effect or destination