Declarative audio synthesis for the web
See the codeDeclarative audio synthesis for the web. Describe sounds as plain objects, play them with one function call.
~11 kB gzipped, tree-shakeable, works with vanilla JS or React.
npm install @web-kits/audio
import { defineSound, ensureReady } from "@web-kits/audio";
const click = defineSound({
source: { type: "sine", frequency: { start: 1200, end: 300 } },
envelope: { attack: 0.001, decay: 0.06, sustain: 0, release: 0.03 },
gain: 0.3,
});
await ensureReady();
click();
import { usePatch } from "@web-kits/audio/react";
function App() {
const patch = usePatch("/patches/core.json");
return (
<button onClick={() => patch.play("click")} disabled={!patch.ready}>
Click me
</button>
);
}
Browse and install community sound patches directly from GitHub repos:
# Browse the registry
npx @web-kits/audio add
# Install from a GitHub repo
npx @web-kits/audio add user/repo
# Create a new patch
npx @web-kits/audio init
# List installed patches
npx @web-kits/audio list
packages/audio Core library + CLI (published to npm)
apps/web Documentation, registry, and homepage
ui/ Shared UI components
.web-kits/ First-party sound patches & generated code
Full docs at audio.raphaelsalaja.com.
See CONTRIBUTING.md for setup instructions and guidelines.
1,155 followers · starred May 2026
1,694 followers · starred May 2026
475 followers · starred Jul 2026
579 followers · starred Apr 2026
Declarative audio synthesis for the web
See the codeDeclarative audio synthesis for the web. Describe sounds as plain objects, play them with one function call.
~11 kB gzipped, tree-shakeable, works with vanilla JS or React.
npm install @web-kits/audio
import { defineSound, ensureReady } from "@web-kits/audio";
const click = defineSound({
source: { type: "sine", frequency: { start: 1200, end: 300 } },
envelope: { attack: 0.001, decay: 0.06, sustain: 0, release: 0.03 },
gain: 0.3,
});
await ensureReady();
click();
import { usePatch } from "@web-kits/audio/react";
function App() {
const patch = usePatch("/patches/core.json");
return (
<button onClick={() => patch.play("click")} disabled={!patch.ready}>
Click me
</button>
);
}
Browse and install community sound patches directly from GitHub repos:
# Browse the registry
npx @web-kits/audio add
# Install from a GitHub repo
npx @web-kits/audio add user/repo
# Create a new patch
npx @web-kits/audio init
# List installed patches
npx @web-kits/audio list
packages/audio Core library + CLI (published to npm)
apps/web Documentation, registry, and homepage
ui/ Shared UI components
.web-kits/ First-party sound patches & generated code
Full docs at audio.raphaelsalaja.com.
See CONTRIBUTING.md for setup instructions and guidelines.
1,155 followers · starred May 2026
1,694 followers · starred May 2026
475 followers · starred Jul 2026
579 followers · starred Apr 2026