Skip to main content

Class: Sonifier

Defined in: src/audio/sonifier/Sonifier.ts:154

Maps data to sound and plays it.

Constructors​

Constructor​

new Sonifier(options): Sonifier

Defined in: src/audio/sonifier/Sonifier.ts:160

Parameters​

options​

SonifierOptions = {}

Returns​

Sonifier

Methods​

bindToTracker()​

bindToTracker(tracker, options): SonifierBinding

Defined in: src/audio/sonifier/Sonifier.ts:261

Make a live tracker value drive pitch each frame.

Adds an updater to the tracker, so the tracker must be in a scene (or be updated by hand) for the sound to follow it.

Parameters​

tracker​

ValueTracker

options​

SonifierMappingOptions = {}

Returns​

SonifierBinding


dispose()​

dispose(): void

Defined in: src/audio/sonifier/Sonifier.ts:311

Stop all sound and close the context if this instance created it.

Returns​

void


play()​

play(series, options): SonifierPlayback

Defined in: src/audio/sonifier/Sonifier.ts:225

Play a data series as stepped pitch.

Parameters​

series​

readonly number[]

options​

SonifierPlayOptions = {}

Returns​

SonifierPlayback

A handle with the total duration and a stop method. In an environment without Web Audio the handle is a no-op with the same duration.


stop()​

stop(): void

Defined in: src/audio/sonifier/Sonifier.ts:306

Stop every voice. The context stays open.

Returns​

void