Class: SoundManager

Managers.SoundManager() → {SoundManger}

sound manager. singleton.

Constructor

new SoundManager() → {SoundManger}

Enforce singleton pattern
Source:
Returns:
Type
SoundManger

Members

isReady

check if sound is loaded and ready to play
Source:

selectedSound :Sound

currently selected sound
Type:
Source:

sound :Sound

sound to potentially be played
Type:
Source:

soundList :Array:.<Sound:>

list of sounds
Type:
Source:

Methods

add(sound)

add song to the sound list
Parameters:
Name Type Description
sound Sound
Source:

loadSound()

load sound using p5 sound library, and set the sound property. return promise wrapping the loaded sound
Source:

select(name)

select a sound from the sound list
Parameters:
Name Type Description
name string
Source:

selectNext()

select a next sound from the sound list
Source:

selectPrevious()

select a previous sound from the sound list
Source: