Overview
@web-kits/audio is a declarative audio synthesis library for the web. Define sounds as plain objects and play them with a single function call.
Quickstart
Install @web-kits/audio with your package manager of choice.
Define a sound as a plain object and call the returned function to play it.
import { defineSound } from "@web-kits/audio";
const pop = defineSound({
source: { type: "sine", frequency: { start: 400, end: 150 } },
envelope: { decay: 0.05 },
gain: 0.35,
});
pop();Get Started
Integrate
Sound PatchesBundling sounds as patches.React HooksuseSound, usePatch, and more.CLIInstall patches from the registry, GitHub, or disk.