Track

Module containing functionality to create new WebAudioAPI tracks.

Methods

static createTrack(name, audioContext, tempo, keySignature, trackAudioSink) → {Track}

Creates a new audio Track object capable of playing sequential audio.

Parameters:
Name Type Description
name string

Name of the track to create

audioContext AudioContext

Reference to the global browser AudioContext

tempo Tempo

Reference to the Tempo object stored in the global WebAudioAPI object

keySignature Key

Reference to the Key object stored in the global WebAudioAPI object

trackAudioSink AudioNode

Reference to the AudioNode to which the output of this track should be connected

Returns:
Track -

Newly created audio Track

See: