Master
The volume, pan and limiter every sound passes through.
The meter taps getMasterOutput() with an AnalyserNode. Turn the limiter off, then fire twelve lasers at once: that crackle is clipping.
Sprites
One 30 second file, eight regions. Each pad plays a slice of the same buffer.
Overlap
With overlap: true every click starts a new instance instead of restarting the sound.
0 playing, at most 16: the lasers group has maxInstances: 16.
Player
Transport, fades, mute, seeking and playback rate on one buffered sound.
Times are positions in the file at any rate. Mute, stop and play again: it stays muted until you unmute.
Groups
Both beds play into one ambience group, which gives them its options: looping at volume 0.4.
In the group: empty
Ducking
duck('music', { when: 'announcer' }) turns the music down while the announcer speaks and brings it back after.
Music at 100% of its own volume.
Variations
One name, three takes. play('hit') never repeats the last take and spreads the pitch by ±8%.
Last take: none yet
Interface sounds
Twelve sounds from soundhub/ui, rendered in the browser. None of them is a file.
Spatial audio
A helicopter on a 3D panner, seen from above. Drag it around you. Headphones help.
Position 3.0, 0, -4.0. Turning around moves you, not the helicopter: same panner, other end.
Stream
Loaded with loadStream: the browser fetches while it plays, so an hour long file costs little memory.
Playing puts it on the lock screen with setMediaSession, so media keys work too.
Deferred loading
Registered with registerSound but not fetched. The first click loads the file, then plays it.
Formats this browser plays: -
Event log
Every event the library dispatches, newest first.
- Nothing yet. Play something.