Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AbstractWebAudioModule<Node>

Main WebAudioModule interface, its constructor should be the export default of the ESM of each WAM.

Type parameters

Hierarchy

  • AbstractWebAudioModule

Index

Properties

audioContext: BaseAudioContext

The AudioContext where the plugin's node lives in

audioNode: Node

The AudioNode that handles audio in the plugin where the host can connect to/from

descriptor: WamDescriptor

The values from descriptor.json

groupId: string

The identifier of the current WAM's group.

initialized: boolean

This will return true after calling initialize().

instanceId: string

The unique identifier of the current WAM instance.

isWebAudioModule: boolean

should return true

moduleId: string

The identifier of the current WAM, composed of vender + name

name: string

The WAM's name

vendor: string

The WAM Vendor's name

Methods

  • This async method must be redefined to get AudioNode that will connected to the host. It can be any object that extends AudioNode and implements WamNode

    Parameters

    • Optional initialState: any

    Returns Promise<AbstractWamNode>

  • createGui(): Promise<Element>
  • Redefine this method to get the WAM's GUI as an HTML Element.

    Returns Promise<Element>

  • destroyGui(gui: Element): void
  • Clean up an element previously returned by createGui

    Parameters

    • gui: Element

    Returns void

  • The host will call this method to initialize the WAM with an initial state.

    In this method, WAM devs should call createAudioNode() and store its return AudioNode to this.audioNode, then set initialized to true to ensure that the audioNode property is available after initialized.

    These two behaviors are implemented by default in the SDK.

    The WAM devs can also fetch and preload the GUI Element in while initializing.

    Parameters

    • Optional state: any

    Returns Promise<AbstractWebAudioModule<AbstractWamNode>>

Generated using TypeDoc