# @web-kits/audio

> Declarative Web Audio for UI sounds: define a pop, beep or click from oscillators and envelopes, no files.

Source: https://tastebase.ehsanulsiam.workers.dev/browse/web-kits-audio

free

Declarative Web Audio for UI sounds: define a pop, beep or click from oscillators and envelopes, no files.

by Raphael Salaja[GitHub](https://github.com/raphaelsalaja/web-kits)[npm](https://npmjs.com/package/@web-kits/audio)

[visit](https://audio.raphaelsalaja.com/?utm_source=tastebase&utm_medium=referral&utm_content=detail-page)

[https://audio.raphaelsalaja.com](https://audio.raphaelsalaja.com/?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

## Try these

no preview

### [cuelume](https://tastebase.ehsanulsiam.workers.dev/browse/cuelume)

Named interface sounds generated with Web Audio, attached by data attributes or played from code.

no preview

### [soundcn](https://tastebase.ehsanulsiam.workers.dev/browse/soundcn)

700+ short CC0 sound effects (clicks, chimes, game sounds) installed as code with the shadcn CLI.

no preview

### [slot-text](https://tastebase.ehsanulsiam.workers.dev/browse/slot-text)

Zero-dependency text roll: labels change by rolling characters like a slot machine (Copy to Copied).

no preview

### [glimm](https://tastebase.ehsanulsiam.workers.dev/browse/glimm)

Shader-driven page transitions for Next.js: links trigger a WebGL wipe between routes.

## For your agent

##### Install

`npm i @web-kits/audio`

##### Use it for

- a pop, beep or chime synthesised with Web Audio oscillators and envelopes in code

##### Skip it when

- you want ready-made sounds by name: use cuelume or soundcn

##### What's inside20 free

- defineSound
- defineSequence
- definePatch
- SoundProvider
- useSound
- useSequence
- usePatch
- useAnalyser
- renderToWav
- CLI
- Core patch
- Mechanical patch
- Retro patch
- Minimal patch
- Soft patch
- Crisp patch
- Organic patch
- Playful patch
- Drums patch
- Synths patch

##### Facts

**Frameworks**
react, vanilla

**Styling**
unstyled

**Weight**
tiny

**Accessibility**
n/a

**Maturity**
experimental

**License**
MIT

**Price**
Free

##### Alternatives

[cuelume](https://tastebase.ehsanulsiam.workers.dev/browse/cuelume)[soundcn](https://tastebase.ehsanulsiam.workers.dev/browse/soundcn)

[Compare @web-kits/audio with its alternatives](https://tastebase.ehsanulsiam.workers.dev/alternatives/web-kits-audio-alternatives)

```
import { defineSound, ensureReady } from "@web-kits/audio"

const pop = defineSound({
  source: { type: "sine", frequency: { start: 1200, end: 300 } },
  envelope: { attack: 0.001, decay: 0.06, sustain: 0, release: 0.03 },
  gain: 0.3,
})

button.onclick = async () => { await ensureReady(); pop() }
```

https://audio.raphaelsalaja.com/library

This site doesn't allow being shown inside another page. Here is how it looks.

[Open in a new tab](https://audio.raphaelsalaja.com/library?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

[Visit](https://audio.raphaelsalaja.com/?utm_source=tastebase&utm_medium=referral&utm_content=floating-pill)
