API Docs for: 2.7.1
Show:

Fader Class

Extends BaseEffect
Module: Effects

An effect changes the amplitude or volume of the audio that this effect is connected to.

Constructor

Fader

(
  • [context]
)

Parameters:

  • [context] AudioContext optional

    AudioContext to be used.

Methods

connect

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

Inherited from BaseEffect:

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]
)

Inherited from BaseEffect:

Disconnects the Sound from the AudioNode Chain.

Parameters:

  • [outputIndex] Number optional

    Index describing which output of the AudioNode to disconnect.

listParams

(
  • [paramArray]
)

Inherited from BaseEffect:

List all SPAudioParams this Sound exposes

Parameters:

  • [paramArray] Array optional

    Array of all the SPAudioParams this Sound exposes.

Properties

audioContext

AudioContext

Inherited from BaseEffect:

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

destinations

Array

Inherited from BaseEffect:

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

inputNode

AudioNode final

Inherited from BaseEffect:

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

isInitialized

Boolean

Inherited from BaseEffect:

If Sound is currently initialized.

Default: false

isPlaying

Boolean

Inherited from BaseEffect:

If Sound is currently playing.

Default: false

modelName

String

Inherited from BaseEffect:

String name of the effect.

Default: "Model"

numberOfInputs

Number

Inherited from BaseEffect:

Number of inputs

Default: 0

numberOfOutputs

Number

Inherited from BaseEffect:

Number of outputs

Default: 0

outputNode

AudioNode final

Inherited from BaseEffect:

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

volume

SPAudioParam

Fades or reduces the volume of the audio based on the value in percentage. 100% implies no change in volume. 0% implies completely muted audio.

Default: 100

volumeInDB

SPAudioParam

Fades or reduces the volume of the audio based on the value in decibles. 0 dB implies no change in volume. -80 dB implies almost completely muted audio.

Default: 0