new PlugInAbstract()

Plug-In base class.

Methods

static
cut()

Disconnects all outgoing connections fomr plug-in.

static
get(param) → any type

Gets a paramter value.

Parameter

Name Type Optional Description

param

String

 

Parameter name.

Returns

any type Paramter value. Returns null when a paramter not found.

static
getPreset() → Object

Gets a current plug-in paramters as a collection. Note that the collection is created on the fly. It is a clone of current parameter values.

Returns

Object Preset.

static
set(param, arg) → WAPL

Sets a plug-in parameter. Supports dynamic parameter assignment.

Example

// setting parameter with an array
myeffect.set('gain', [[0.0], [1.0, 0.01, 1], [0.0, 0.5, 2]]);
// setting parameter with a value (immediate change)
myeffect.set('gain', 0.0);

Parameters

Name Type Optional Description

param

String

 

Parameter name.

arg

(Array or Number)

 

An array of data points or a single value.

Returns

WAPL Self-reference for method chaining.

static
setPreset(preset)

Sets plug-in preset, which is a collection of parameters. Note that setting a preset changes all the associated parameters immediatley.

Parameter

Name Type Optional Description

preset

Object

 

A collection of paramters.

static
to(target) → (WAPL or AudioNode)

Connects a plug-in output to the other plug-in's input or a WA node. Note that this does not support multiple outgoing connection. (fanning-out)

Parameter

Name Type Optional Description

target

(WAPL or AudioNode)

 

WAPL(Web Audio Plug-In) compatible plug-in or WA node.

Returns

(WAPL or AudioNode)