AudioBits is currently tested in Chromium-based browsers. Other browsers are not yet verified.
Whoosh
Filtered noise sweeps past with an adjustable sense of weight.
Control position · Size 50%
Whoosh: ready
Audio: idle
Sound controls
Add to project
npx shadcn@latest add joacod/audiobits/whooshAdds editable source and the audiobits runtime dependency. Installation guide
Installs the catalog defaults. The usage below reflects your current settings and applied edits.
Use this sound
Use in src/integration.ts. Call play() from a user gesture and handle activation errors. Connect updates to application state; stop on cancellation or hiding, and dispose on removal.
import { createAudio } from "audiobits";
import { whoosh } from "./sounds/recipes/whoosh/recipe";
const audio = createAudio();
const sound = audio.sound(whoosh);
let request = 0;
// Use in src/integration.ts. Call play() from a user gesture; handle errors.
export async function play() {
const token = ++request;
await audio.start();
if (token !== request) return;
sound.play({ parameters: {"size":0.5}, seed: 42 });
}
export function stop() {
request++;
audio.stopAll({ tails: "cut" });
}
// Call on navigation/unmount.
export async function dispose() {
stop();
sound.dispose();
await audio.dispose();
}
Production lifecycleCustomize or inspect
Recipe
Apply valid JSON edits to hear and copy them. Copy Recipe returns the applied definition; the Add command installs catalog defaults.
{
"duration": 0.32,
"kind": "one-shot",
"layers": [
{
"effects": [
{
"filter": "bandpass",
"frequency": {
"curve": "exponential",
"points": [
[
0,
350
],
[
0.13,
{
"control": "size",
"range": [
1800,
3400
],
"scale": "exponential"
}
],
[
0.32,
550
]
]
},
"q": 0.8,
"type": "filter"
}
],
"envelope": {
"attack": 0.08,
"decay": 0.18,
"release": 0.06,
"sustain": 0.02
},
"gainDb": {
"control": "size",
"range": [
-19,
-13
],
"scale": "linear"
},
"id": "sweep",
"source": {
"color": "white",
"type": "noise"
}
},
{
"effects": [
{
"filter": "lowpass",
"frequency": 550,
"q": 0.7,
"type": "filter"
}
],
"envelope": {
"attack": 0.07,
"decay": 0.2,
"release": 0.08,
"sustain": 0.01
},
"gainDb": {
"control": "size",
"range": [
-34,
-23
],
"scale": "linear"
},
"id": "weight",
"source": {
"color": "white",
"type": "noise"
}
}
],
"parameters": {
"size": {
"default": 0.5,
"max": 1,
"min": 0,
"mode": "play"
}
},
"schemaVersion": 1
}