Skip to content

CompositeSoundClip

Overview

A sound generator that is composed of multiple SoundClips that are all started and stopped at the same time. Basically, this is a container to create and control multiple SoundClip instances as one.

@author Michael Kauzmann (PhET Interactive Simulations)

Class CompositeSoundClip

import { CompositeSoundClip } from 'scenerystack/tambo';

Constructor

new CompositeSoundClip( soundsAndOptionsTuples : SoundAndOptions[], options? : CompositeSoundClipOptions )

Instance Methods

play()

stop()

connect( destination : AudioParam | AudioNode )

dispose()

setOutputLevel( outputLevel : number, timeConstant : number )

Type CompositeSoundClipOptions

import type { CompositeSoundClipOptions } from 'scenerystack/tambo';

SoundGeneratorOptions

Type SoundAndOptions

import type { SoundAndOptions } from 'scenerystack/tambo';

Source Code

See the source for CompositeSoundClip.ts in the tambo repository.