Cacophony is an intuitive and powerful audio library designed for the modern web. It's built to simplify audio management within browser-based applications, offering a straightforward interface to the Web Audio API. Cacophony is ideal for projects that require detailed audio control, from simple sound playback to complex audio processing and 3D audio positioning.
AudioBuffer
, URL strings, or user's microphone with ease.npm install cacophony
import { Cacophony } from 'cacophony';
async function playSampleSound() {
const cacophony = new Cacophony();
const sound = await cacophony.createSound('path/to/audio.mp3');
sound.play();
sound.position = [1, 1, 1]; // Set sound position in 3D space
}
playSampleSound();
For a complete overview of all functionality, classes, and methods, please refer to our detailed documentation.
fadeIn
and fadeOut
for nuanced volume control.We welcome contributions! If you're interested in helping improve Cacophony, please check out our contribution guidelines.
Cacophony is open-source software licensed under the MIT License
Generated using TypeDoc